diff options
| author | Aleksa Vuckovic <aleksa@vuckovic.cc> | 2023-02-24 03:54:38 +0100 |
|---|---|---|
| committer | Aleksa Vuckovic <aleksa@vuckovic.cc> | 2023-02-24 03:54:38 +0100 |
| commit | bbe5d2d967a1a77328c71e11823bb57d56ee044c (patch) | |
| tree | 1ad4f5ed0ecfd9bce0cc497a0be59ea9cad094fd /lua/user/lsp/ccls.lua | |
| parent | 0703660d49f22376d52a969e8c3cca64480b0f1b (diff) | |
formatting
Diffstat (limited to 'lua/user/lsp/ccls.lua')
| -rw-r--r-- | lua/user/lsp/ccls.lua | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/lua/user/lsp/ccls.lua b/lua/user/lsp/ccls.lua index 94fe2a0..b3393da 100644 --- a/lua/user/lsp/ccls.lua +++ b/lua/user/lsp/ccls.lua @@ -1,58 +1,58 @@ local status, lspconfig = pcall(require, "lspconfig") if not status then - return + return 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"); +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", }; - vim.notify("mykernel"); +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", }; + vim.notify("mykernel"); end -if string.match(vim.fn.expand('%:p'),"/media/linux/") then - extraArgs_opt = { "--sysroot=/media/linux/staging/", }; - vim.notify("linux"); +if string.match(vim.fn.expand('%:p'), "/media/linux/") then + extraArgs_opt = { "--sysroot=/media/linux/staging/", }; + vim.notify("linux"); end -if string.match(vim.fn.expand('%:p'),"/home/aleksa/files/arduino_avr") then - extraArgs_opt = { "--sysroot=/usr/avr", }; - vim.notify("arduino-avr"); +if string.match(vim.fn.expand('%:p'), "/home/aleksa/files/arduino_avr") then + extraArgs_opt = { "--sysroot=/usr/avr", }; + vim.notify("arduino-avr"); end -if string.match(vim.fn.expand('%:p'),"/home/aleksa/mygit/mykernel64") then - extraArgs_opt = { "--sysroot=/home/aleksa/mygit/mykernel64/kernel", }; - vim.notify("mykernel64"); +if string.match(vim.fn.expand('%:p'), "/home/aleksa/mygit/mykernel64") then + extraArgs_opt = { "--sysroot=/home/aleksa/mygit/mykernel64/kernel", }; + vim.notify("mykernel64"); end lspconfig.ccls.setup { - on_attach = require("user.lsp.handlers").on_attach, - capabilities = require("user.lsp.handlers").capabilities, - - flags = { - debounce_text_changes = 150, - }; - init_options = { - cache = { - directory = "/tmp/ccls-cache"; - }; - index = { - threads = 0; - }; - clang = { - excludeArgs = { "-frounding-math"}; - extraArgs = extraArgs_opt; - } - }; + on_attach = require("user.lsp.handlers").on_attach, + capabilities = require("user.lsp.handlers").capabilities, + + flags = { + debounce_text_changes = 150, + }, + init_options = { + cache = { + directory = "/tmp/ccls-cache", + }, + index = { + threads = 0, + }, + clang = { + excludeArgs = { "-frounding-math" }, + extraArgs = extraArgs_opt, + } + }, } |
