diff --git a/lua/configs/cmp.lua b/lua/configs/cmp.lua index 5bd7096..bebdecf 100644 --- a/lua/configs/cmp.lua +++ b/lua/configs/cmp.lua @@ -84,6 +84,7 @@ function M.config() { name = 'buffer', group_index = 2 }, { name = 'path' }, }, + preselect = cmp.PreselectMode.None, -- do not use sources' suggested pre-selections mapping = { [''] = cmp.mapping.select_prev_item(), [''] = cmp.mapping.select_next_item(), diff --git a/lua/configs/lspconfig.lua b/lua/configs/lspconfig.lua index f0ce6cf..6a8c02d 100644 --- a/lua/configs/lspconfig.lua +++ b/lua/configs/lspconfig.lua @@ -137,6 +137,13 @@ function M.config() lspconfig.tsserver.setup({ on_attach = on_attach, }) + + lspconfig.rust_analyzer.setup({ + on_attach = on_attach, + settings = { + ['rust-analyzer'] = {}, + }, + }) end return M diff --git a/lua/configs/null-ls.lua b/lua/configs/null-ls.lua index 723a660..cf21d0f 100644 --- a/lua/configs/null-ls.lua +++ b/lua/configs/null-ls.lua @@ -21,11 +21,14 @@ function M.config() -- Python -- pip install black - null_ls.builtins.formatting.black, + -- null_ls.builtins.formatting.black, -- pip install isort null_ls.builtins.formatting.isort, + -- pacman -S rustfmt + null_ls.builtins.formatting.rustfmt, + -- JavaScript / TypeScript -- sudo pacman -S prettierd @@ -93,7 +96,18 @@ function M.config() local cwd = vim.fn.getcwd() -- substr the cwd starting at the last "/" character local cwd_name = string.sub(cwd, -cwd:reverse():find('/') + 1) - if cwd_name == 'invsys' or cwd_name == 'invsys-b' then + -- if cwd_name == 'invsys' or cwd_name == 'invsys-b' then + if + cwd_name == 'invsys' + or cwd_name == 'invsys-b' + or cwd_name == 'grid' + or cwd_name == 'factorio-calc' + or cwd_name == 'project-euler-rst' + or cwd_name == 'nvim-config' + or cwd_name == 'video-search' + or cwd_name == 'video-search-web' + or cwd_name == 'cubix' + then vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr }) vim.api.nvim_create_autocmd('BufWritePre', { group = augroup,