diff --git a/.config/nvim/after/plugin/treesitter.lua b/.config/nvim/after/plugin/treesitter.lua index f98af3a..4e8325f 100644 --- a/.config/nvim/after/plugin/treesitter.lua +++ b/.config/nvim/after/plugin/treesitter.lua @@ -22,6 +22,6 @@ require'nvim-treesitter.configs'.setup { -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). -- Using this option may slow down your editor, and you may see some duplicate highlights. -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, + additional_vim_regex_highlighting = true, }, } diff --git a/.config/nvim/lua/sheldonmlee/set.lua b/.config/nvim/lua/sheldonmlee/set.lua index 3ea23dd..ea7989c 100644 --- a/.config/nvim/lua/sheldonmlee/set.lua +++ b/.config/nvim/lua/sheldonmlee/set.lua @@ -1,11 +1,15 @@ vim.opt.number = true vim.opt.relativenumber = true +vim.cmd.syntax("enable") + vim.opt.smartindent = true vim.opt.tabstop = 4 vim.opt.softtabstop = 4 vim.opt.shiftwidth = 4 +vim.opt.linebreak = true + vim.opt.incsearch = true vim.opt.ignorecase = true vim.opt.smartcase = true @@ -17,3 +21,9 @@ vim.opt.scrolloff = 8 -- 'auto:1 sets signcolumn to hide if there is no warning/error etc. -- 'no' disables signcolumn vim.opt.signcolumn = 'no' + +vim.api.nvim_create_autocmd('BufWritePre', { + pattern = { '*.tsx', '*.ts', '*.jsx', '*.js' }, + command = 'silent! EslintFixAll', + group = vim.api.nvim_create_augroup('Eslint', {}), +})