last few modifications
This commit is contained in:
parent
d1f79cc0fa
commit
b1af4a07a4
@ -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 = {
|
||||
['<C-k>'] = cmp.mapping.select_prev_item(),
|
||||
['<C-j>'] = cmp.mapping.select_next_item(),
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user