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 = 'buffer', group_index = 2 },
|
||||||
{ name = 'path' },
|
{ name = 'path' },
|
||||||
},
|
},
|
||||||
|
preselect = cmp.PreselectMode.None, -- do not use sources' suggested pre-selections
|
||||||
mapping = {
|
mapping = {
|
||||||
['<C-k>'] = cmp.mapping.select_prev_item(),
|
['<C-k>'] = cmp.mapping.select_prev_item(),
|
||||||
['<C-j>'] = cmp.mapping.select_next_item(),
|
['<C-j>'] = cmp.mapping.select_next_item(),
|
||||||
|
@ -137,6 +137,13 @@ function M.config()
|
|||||||
lspconfig.tsserver.setup({
|
lspconfig.tsserver.setup({
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
lspconfig.rust_analyzer.setup({
|
||||||
|
on_attach = on_attach,
|
||||||
|
settings = {
|
||||||
|
['rust-analyzer'] = {},
|
||||||
|
},
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
@ -21,11 +21,14 @@ function M.config()
|
|||||||
-- Python
|
-- Python
|
||||||
|
|
||||||
-- pip install black
|
-- pip install black
|
||||||
null_ls.builtins.formatting.black,
|
-- null_ls.builtins.formatting.black,
|
||||||
|
|
||||||
-- pip install isort
|
-- pip install isort
|
||||||
null_ls.builtins.formatting.isort,
|
null_ls.builtins.formatting.isort,
|
||||||
|
|
||||||
|
-- pacman -S rustfmt
|
||||||
|
null_ls.builtins.formatting.rustfmt,
|
||||||
|
|
||||||
-- JavaScript / TypeScript
|
-- JavaScript / TypeScript
|
||||||
|
|
||||||
-- sudo pacman -S prettierd
|
-- sudo pacman -S prettierd
|
||||||
@ -93,7 +96,18 @@ function M.config()
|
|||||||
local cwd = vim.fn.getcwd()
|
local cwd = vim.fn.getcwd()
|
||||||
-- substr the cwd starting at the last "/" character
|
-- substr the cwd starting at the last "/" character
|
||||||
local cwd_name = string.sub(cwd, -cwd:reverse():find('/') + 1)
|
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_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||||
vim.api.nvim_create_autocmd('BufWritePre', {
|
vim.api.nvim_create_autocmd('BufWritePre', {
|
||||||
group = augroup,
|
group = augroup,
|
||||||
|
Loading…
Reference in New Issue
Block a user