change comment plugin
This commit is contained in:
parent
109e3f7a63
commit
2518095dcb
16
init.lua
16
init.lua
|
|
@ -306,7 +306,7 @@ require('lazy').setup({
|
|||
change = { text = '~' },
|
||||
delete = { text = '_' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
changedelete = { text = '`' },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
@ -639,6 +639,13 @@ require('lazy').setup({
|
|||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf })
|
||||
end, '[T]oggle Inlay [H]ints')
|
||||
end
|
||||
|
||||
if client and client.name == 'eslint' then
|
||||
vim.api.nvim_create_autocmd({ 'BufWritePre' }, {
|
||||
pattern = { '*.tsx', '*.ts', '*.jsx', '*.js' },
|
||||
command = 'EslintFixAll',
|
||||
})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
|
@ -739,7 +746,7 @@ require('lazy').setup({
|
|||
-- Disable "format_on_save lsp_fallback" for languages that don't
|
||||
-- have a well standardized coding style. You can add additional
|
||||
-- languages here or re-enable it for the disabled ones.
|
||||
local disable_filetypes = { c = true, cpp = true, javascript = true }
|
||||
local disable_filetypes = { c = true, cpp = true }
|
||||
return {
|
||||
timeout_ms = 500,
|
||||
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
|
||||
|
|
@ -831,6 +838,8 @@ require('lazy').setup({
|
|||
['<C-j>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.confirm { select = true }
|
||||
elseif luasnip.expand_or_locally_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
cmp.complete()
|
||||
end
|
||||
|
|
@ -884,9 +893,6 @@ require('lazy').setup({
|
|||
end,
|
||||
},
|
||||
|
||||
-- Highlight todo, notes, etc in comments
|
||||
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
|
||||
|
||||
{ -- Highlight, edit, and navigate code
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
'numToStr/Comment.nvim',
|
||||
opts = {},
|
||||
}
|
||||
Loading…
Reference in New Issue