Mercurial > dotfiles
comparison dot_config/nvim/init.lua @ 435:e67efbc7de41
Complete pairs inside python f-strings
author | zegervdv <zegervdv@me.com> |
---|---|
date | Sun, 15 Aug 2021 10:10:35 +0200 |
parents | 4a539353bd54 |
children | 766e63b3a8fc |
comparison
equal
deleted
inserted
replaced
434:3339d673ee5e | 435:e67efbc7de41 |
---|---|
77 'b3nj5m1n/kommentary', | 77 'b3nj5m1n/kommentary', |
78 config = function() | 78 config = function() |
79 require('kommentary.config').configure_language('default', { prefer_single_line_comments = true }) | 79 require('kommentary.config').configure_language('default', { prefer_single_line_comments = true }) |
80 end, | 80 end, |
81 keys = { | 81 keys = { |
82 { 'n', 'gcc' }, | 82 { 'n', 'gcc' }, |
83 { 'v', 'gc' }, | 83 { 'v', 'gc' }, |
84 }, | 84 }, |
85 } | 85 } |
86 | 86 |
87 -- Undoing | 87 -- Undoing |
93 'windwp/nvim-autopairs', | 93 'windwp/nvim-autopairs', |
94 config = function() | 94 config = function() |
95 local npairs = require 'nvim-autopairs' | 95 local npairs = require 'nvim-autopairs' |
96 local Rule = require 'nvim-autopairs.rule' | 96 local Rule = require 'nvim-autopairs.rule' |
97 | 97 |
98 npairs.setup() | 98 npairs.setup { |
99 ignored_next_char = string.gsub([[ [%w%%%'%[%.] ]], '%s+', ''), | |
100 } | |
99 | 101 |
100 require('nvim-autopairs.completion.compe').setup { | 102 require('nvim-autopairs.completion.compe').setup { |
101 map_cr = true, | 103 map_cr = true, |
102 map_complete = true, | 104 map_complete = true, |
103 } | 105 } |
131 return opts.prev_char:match '.%]' ~= nil | 133 return opts.prev_char:match '.%]' ~= nil |
132 end) | 134 end) |
133 :use_key ']', | 135 :use_key ']', |
134 } | 136 } |
135 | 137 |
136 npairs.get_rule('`') | 138 npairs.get_rule('`'):with_pair(function() |
137 :with_pair(function() | 139 return vim.bo.filetype ~= 'systemverilog' |
138 return vim.bo.filetype ~= 'systemverilog' | 140 end) |
139 end) | |
140 end, | 141 end, |
141 } | 142 } |
142 | 143 |
143 -- Moving around within lines | 144 -- Moving around within lines |
144 use { 'wellle/targets.vim', event = 'InsertEnter *' } | 145 use { 'wellle/targets.vim', event = 'InsertEnter *' } |