aboutsummaryrefslogtreecommitdiff
path: root/nvim/lua/plugins
diff options
context:
space:
mode:
authorThomas Schmucker <ts@its1.de>2026-01-08 17:25:42 +0100
committerThomas Schmucker <ts@its1.de>2026-01-08 17:25:42 +0100
commit1f2dad0be57a20bca63b251d0b22c57839a6f794 (patch)
tree56844c50cfc60b54b5a8b886113de3e95b551f5e /nvim/lua/plugins
parentcab771e6d1cc578e956f8bd9e3544cd0502b65a9 (diff)
downloaddotfiles-1f2dad0be57a20bca63b251d0b22c57839a6f794.tar.gz
dotfiles-1f2dad0be57a20bca63b251d0b22c57839a6f794.tar.bz2
dotfiles-1f2dad0be57a20bca63b251d0b22c57839a6f794.zip
Neovim: Benutze conform.nvim als Standard-Formater
Diffstat (limited to 'nvim/lua/plugins')
-rw-r--r--nvim/lua/plugins/format.lua20
-rw-r--r--nvim/lua/plugins/lsp.lua16
2 files changed, 36 insertions, 0 deletions
diff --git a/nvim/lua/plugins/format.lua b/nvim/lua/plugins/format.lua
new file mode 100644
index 0000000..bdfaf03
--- /dev/null
+++ b/nvim/lua/plugins/format.lua
@@ -0,0 +1,20 @@
1return {
2 "stevearc/conform.nvim",
3 event = { "BufReadPre", "BufNewFile" },
4 opts = {
5 formatters_by_ft = {
6 sh = { "shfmt" }, -- brew install
7 bash = { "shfmt" },
8 python = { "ruff_format", "black" }, -- brew install ruff
9 lua = { "stylua" }, -- brew install stylua
10 typescript = { "prettierd", "prettier" },
11 javascript = { "prettierd", "prettier" },
12 json = { "jq" }, -- brew install jq
13 -- cpp = { "clang_format" },
14 },
15 },
16
17 config = function(_, opts)
18 require("conform").setup(opts)
19 end,
20}
diff --git a/nvim/lua/plugins/lsp.lua b/nvim/lua/plugins/lsp.lua
index 4c549a7..30e3924 100644
--- a/nvim/lua/plugins/lsp.lua
+++ b/nvim/lua/plugins/lsp.lua
@@ -20,6 +20,22 @@ return {
20 }, 20 },
21 } 21 }
22 22
23 vim.lsp.config.bashls = {
24 settings = {
25 bashIde = {
26 shellcheck = {
27 enable = true,
28 severity = {
29 error = "error",
30 warning = "warning",
31 info = "info",
32 },
33 },
34 globPattern = "**/*.sh",
35 },
36 },
37 }
38
23 vim.lsp.enable({ 39 vim.lsp.enable({
24 "bashls", -- npm install -g bash-language-server 40 "bashls", -- npm install -g bash-language-server
25 "clangd", -- pkg install llvm 41 "clangd", -- pkg install llvm