diff options
Diffstat (limited to '.config/nvim/lua/custom')
| -rw-r--r-- | .config/nvim/lua/custom/config/language-servers.lua | 15 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/plugins/nvim-lint.lua | 4 |
2 files changed, 17 insertions, 2 deletions
diff --git a/.config/nvim/lua/custom/config/language-servers.lua b/.config/nvim/lua/custom/config/language-servers.lua index 2e33668..2c6b012 100644 --- a/.config/nvim/lua/custom/config/language-servers.lua +++ b/.config/nvim/lua/custom/config/language-servers.lua @@ -14,7 +14,15 @@ return { }, }, -- lua clangd = { - cmd = { 'clangd', '--clang-tidy' }, + cmd = { + 'clangd', + '--background-index', + '--clang-tidy', + '--header-insertion=iwyu', + '--completion-style=detailed', + '--function-arg-placeholders', + '--fallback-style=llvm', + }, root_dir = function(filename) return require('lspconfig/util').root_pattern( '.clang-tidy', @@ -23,6 +31,11 @@ return { '.git' )(filename) or vim.fn.getcwd() end, + -- init_options = { + -- usePlaceholders = true, + -- completeUnimported = true, + -- clangdFileStatus = true, + -- }, }, -- c/cpp neocmake = { root_dir = function(filename) diff --git a/.config/nvim/lua/custom/plugins/nvim-lint.lua b/.config/nvim/lua/custom/plugins/nvim-lint.lua index 0ff280c..a6d5808 100644 --- a/.config/nvim/lua/custom/plugins/nvim-lint.lua +++ b/.config/nvim/lua/custom/plugins/nvim-lint.lua @@ -1,9 +1,11 @@ return { 'mfussenegger/nvim-lint', - event = { 'BufReadPre', 'BufNewFile' }, + lazy = false, config = function() local lint = require('lint') lint.linters_by_ft = { + c = { 'clangtidy' }, + cpp = { 'clangtidy' }, go = { 'golangci-lint' }, python = { 'flake8' }, json = { 'jsonlint' }, |
