From 506fa11fc88dbacf80d1ba93d88e65244966050c Mon Sep 17 00:00:00 2001 From: Aleksa Vuckovic Date: Fri, 3 Feb 2023 01:57:29 +0100 Subject: nvim-tree & lsp fixes --- lua/user/lsp/ccls.lua | 11 +++++++++-- lua/user/lsp/handlers.lua | 2 +- lua/user/nvim-tree.lua | 6 ------ 3 files changed, 10 insertions(+), 9 deletions(-) (limited to 'lua/user') diff --git a/lua/user/lsp/ccls.lua b/lua/user/lsp/ccls.lua index 0082c39..f8817dc 100644 --- a/lua/user/lsp/ccls.lua +++ b/lua/user/lsp/ccls.lua @@ -7,6 +7,13 @@ end vim.notify(vim.fn.expand('%:p')); local extraArgs_opt = {}; +if string.match(vim.fn.expand('%:p'),"/home/aleksa/mygit/benet.rs/") then + vim.opt["shiftwidth"]=2; + vim.opt["tabstop"]=2; + vim.opt["expandtab"]=true; + vim.notify("jsx"); +end + if string.match(vim.fn.expand('%:p'),"/home/aleksa/mygit/oldrepos/mykernel/") then extraArgs_opt = { "--sysroot=/opt/aleksa", "--gcc-toolchain=/opt/aleksa/usr/bin/i686-aleksa-gcc", }; --[[ @@ -17,8 +24,8 @@ if string.match(vim.fn.expand('%:p'),"/home/aleksa/mygit/oldrepos/mykernel/") th vim.notify("mykernel"); end -if string.match(vim.fn.expand('%:p'),"/media/files/git/") then - extraArgs_opt = { "--sysroot=/media/files/git/staging", }; +if string.match(vim.fn.expand('%:p'),"/media/linux/") then + extraArgs_opt = { "--sysroot=/media/linux/staging/", }; vim.notify("linux"); end diff --git a/lua/user/lsp/handlers.lua b/lua/user/lsp/handlers.lua index 5bc3074..085f449 100644 --- a/lua/user/lsp/handlers.lua +++ b/lua/user/lsp/handlers.lua @@ -99,6 +99,6 @@ if not status_ok then return end -M.capabilities = cmp_nvim_lsp.update_capabilities(capabilities) +M.capabilities = cmp_nvim_lsp.default_capabilities(capabilities) return M diff --git a/lua/user/nvim-tree.lua b/lua/user/nvim-tree.lua index fbee090..ec7cb70 100644 --- a/lua/user/nvim-tree.lua +++ b/lua/user/nvim-tree.lua @@ -16,12 +16,6 @@ local tree_cb = nvim_tree_config.nvim_tree_callback nvim_tree.setup { disable_netrw = true, hijack_netrw = true, - open_on_setup = false, - ignore_ft_on_setup = { - "startify", - "dashboard", - "alpha", - }, open_on_tab = false, hijack_cursor = false, update_cwd = true, -- cgit v1.2.3