summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/custom
diff options
context:
space:
mode:
authorKyren223 <Kyren223@proton.me>2024-11-30 11:55:46 +0200
committerKyren223 <Kyren223@proton.me>2024-11-30 11:55:46 +0200
commitccc402964b4e75efa1337672b08c631ebefbb485 (patch)
treec03399a3fe96c596e7bcd584b4a6d42fab4660f8 /.config/nvim/lua/custom
parent03e05cddf822ab08ba5496c74c50115ce52c0772 (diff)
Added back C and other languages LSPs and tooling
Diffstat (limited to '.config/nvim/lua/custom')
-rw-r--r--.config/nvim/lua/custom/config/language-servers.lua84
-rw-r--r--.config/nvim/lua/custom/plugins/conform.lua2
-rw-r--r--.config/nvim/lua/custom/plugins/mason.lua8
3 files changed, 47 insertions, 47 deletions
diff --git a/.config/nvim/lua/custom/config/language-servers.lua b/.config/nvim/lua/custom/config/language-servers.lua
index 4163628..88b9db9 100644
--- a/.config/nvim/lua/custom/config/language-servers.lua
+++ b/.config/nvim/lua/custom/config/language-servers.lua
@@ -13,48 +13,48 @@ return {
},
},
}, -- lua
- -- clangd = {
- -- 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',
- -- '.clang-format',
- -- 'compile_commands.json',
- -- '.git'
- -- )(filename) or vim.fn.getcwd()
- -- end,
- -- init_options = {
- -- usePlaceholders = true,
- -- completeUnimported = true,
- -- clangdFileStatus = true,
- -- },
- -- }, -- c/cpp
- -- neocmake = {
- -- root_dir = function(filename)
- -- return require('lspconfig/util').root_pattern(
- -- 'CMakePresets.json',
- -- 'CTestConfig.cmake',
- -- 'build',
- -- 'cmake',
- -- '.git' -- NOTE: git is last due to monorepos (so it tries to use build/cmake first)
- -- )(filename) or vim.fn.getcwd()
- -- end,
- -- },
- -- pyright = {
- -- settings = {
- -- python = {
- -- pythonPath = '~/python/venv/bin/python',
- -- },
- -- },
- -- }, -- python
+ clangd = {
+ 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',
+ '.clang-format',
+ 'compile_commands.json',
+ '.git'
+ )(filename) or vim.fn.getcwd()
+ end,
+ init_options = {
+ usePlaceholders = true,
+ completeUnimported = true,
+ clangdFileStatus = true,
+ },
+ }, -- c/cpp
+ neocmake = {
+ root_dir = function(filename)
+ return require('lspconfig/util').root_pattern(
+ 'CMakePresets.json',
+ 'CTestConfig.cmake',
+ 'build',
+ 'cmake',
+ '.git' -- NOTE: git is last due to monorepos (so it tries to use build/cmake first)
+ )(filename) or vim.fn.getcwd()
+ end,
+ },
+ pyright = {
+ settings = {
+ python = {
+ pythonPath = '~/python/venv/bin/python',
+ },
+ },
+ }, -- python
bashls = true, -- bash
taplo = true, -- toml
lemminx = true, -- xml
diff --git a/.config/nvim/lua/custom/plugins/conform.lua b/.config/nvim/lua/custom/plugins/conform.lua
index 2610884..30d7588 100644
--- a/.config/nvim/lua/custom/plugins/conform.lua
+++ b/.config/nvim/lua/custom/plugins/conform.lua
@@ -13,7 +13,7 @@ return {
opts = {
formatters_by_ft = {
['lua'] = { 'stylua' },
- -- ['c'] = { 'clang-format' },
+ ['c'] = { 'clang-format' },
-- ['python'] = { 'isort', 'black' },
-- ['rust'] = { 'rustfmt' },
['go'] = { 'gofumpt', 'goimports-reviser' },
diff --git a/.config/nvim/lua/custom/plugins/mason.lua b/.config/nvim/lua/custom/plugins/mason.lua
index c42ebc0..43e1557 100644
--- a/.config/nvim/lua/custom/plugins/mason.lua
+++ b/.config/nvim/lua/custom/plugins/mason.lua
@@ -18,14 +18,14 @@ return {
opts = {
ensure_installed = {
'stylua', -- lua formatting
- -- 'clang-format', -- C/C++ formatter
- -- 'codelldb', -- C/C++ debugger
- -- 'cpplint', -- C/C++ linter
+ 'clang-format', -- C/C++ formatter
+ 'codelldb', -- C/C++ debugger
+ 'cpplint', -- C/C++ linter
-- 'black', -- python formatter
-- 'isort', -- python formatter for imports
-- 'flake8', -- python linter
'gofumpt', -- go formatter
- -- 'golangci-lint', -- go linter
+ 'golangci-lint', -- go linter
'prettierd', -- multi-lang formatter
'prettier', -- prettierd but slower, used as a fallback
'jq', -- json formatter