diff options
| author | Aleksa Vučković <aleksav013@gmail.com> | 2022-01-05 15:35:38 +0100 |
|---|---|---|
| committer | Aleksa Vučković <aleksav013@gmail.com> | 2022-01-05 15:35:38 +0100 |
| commit | 6c1c6ba2f5b45c0c3ba178ee34a9992ce23b7180 (patch) | |
| tree | 48fad4a844d874303149f829db4a062634b10f79 /lua/user/lsp/settings | |
| parent | 2a5f4d72d21d495408a52a2cad271b1e5775967b (diff) | |
ccls working as intended
Diffstat (limited to 'lua/user/lsp/settings')
| -rw-r--r-- | lua/user/lsp/settings/bashls.lua | 0 | ||||
| -rw-r--r-- | lua/user/lsp/settings/ccls.lua | 34 | ||||
| -rw-r--r-- | lua/user/lsp/settings/texlab.lua | 0 |
3 files changed, 34 insertions, 0 deletions
diff --git a/lua/user/lsp/settings/bashls.lua b/lua/user/lsp/settings/bashls.lua new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/lua/user/lsp/settings/bashls.lua diff --git a/lua/user/lsp/settings/ccls.lua b/lua/user/lsp/settings/ccls.lua new file mode 100644 index 0000000..d663f7c --- /dev/null +++ b/lua/user/lsp/settings/ccls.lua @@ -0,0 +1,34 @@ +local status, lspconfig = pcall(require, "lspconfig") +if not status then + return +end + + +vim.notify(vim.fn.expand('%:p')); +local extraArgs_opt = {}; + +if string.match(vim.fn.expand('%:p'),"/home/aleksa/mygit/mykernel/") then + extraArgs_opt = { "--sysroot=/home/aleksa/mygit/mykernel/sysroot", "--gcc-toolchain=/usr/bin/i686-elf-gcc", "-ffreestanding", "-nobuiltininc"}; +else +end + + +lspconfig.ccls.setup { + on_attach = on_attach, + flags = { + debounce_text_changes = 150, + }; + init_options = { + compilationDatabaseDirectory = "build"; + cache = { + directory = "/tmp/ccls-cache"; + }; + index = { + threads = 0; + }; + clang = { + excludeArgs = { "-frounding-math"}; + extraArgs = extraArgs_opt; + } + }; +} diff --git a/lua/user/lsp/settings/texlab.lua b/lua/user/lsp/settings/texlab.lua new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/lua/user/lsp/settings/texlab.lua |
