diff --git a/init.lua b/init.lua index 9fcf1408..9822096f 100644 --- a/init.lua +++ b/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({ [''] = 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', diff --git a/lua/custom/plugins/comment.lua b/lua/custom/plugins/comment.lua new file mode 100644 index 00000000..c0865530 --- /dev/null +++ b/lua/custom/plugins/comment.lua @@ -0,0 +1,4 @@ +return { + 'numToStr/Comment.nvim', + opts = {}, +}