feat(nvim): add autoindent and JS lsp
This commit is contained in:
parent
d5a9b24de1
commit
c6d65aee19
2 changed files with 21 additions and 2 deletions
config/nvim
|
@ -40,3 +40,20 @@ require("neo-tree").setup({
|
|||
})
|
||||
require('todo-comments').setup()
|
||||
require("scrollbar").setup()
|
||||
|
||||
-- Auto indent when pressing Enter between brackets
|
||||
local remap = vim.api.nvim_set_keymap
|
||||
local npairs = require('nvim-autopairs')
|
||||
npairs.setup({map_cr=false})
|
||||
|
||||
_G.MUtils= {}
|
||||
|
||||
MUtils.completion_confirm=function()
|
||||
if vim.fn["coc#pum#visible"]() ~= 0 then
|
||||
return vim.fn["coc#pum#confirm"]()
|
||||
else
|
||||
return npairs.autopairs_cr()
|
||||
end
|
||||
end
|
||||
|
||||
remap('i' , '<CR>','v:lua.MUtils.completion_confirm()', {expr = true , noremap = true})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue