From b73dfa124e10e209dd7bef03a0df2b65d4ad7d30 Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Fri, 13 Mar 2026 14:59:34 +0100 Subject: neovim: reformat --- nvim/lua/plugins/lsp.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'nvim/lua') diff --git a/nvim/lua/plugins/lsp.lua b/nvim/lua/plugins/lsp.lua index 3d53350..4640678 100644 --- a/nvim/lua/plugins/lsp.lua +++ b/nvim/lua/plugins/lsp.lua @@ -95,11 +95,11 @@ return { vim.lsp.enable({ "basedpyright", -- npm install -g basedpyright, brew install basedpyright - "bashls", -- npm install -g bash-language-server, pkg install hs-ShellCheck - "clangd", -- pkg install llvm - "lua_ls", -- pkg install lua-language-server - "prismals", -- npm install -g @prisma/language-server - "vtsls", -- npm install -g @vtsls/language-server + "bashls", -- npm install -g bash-language-server, pkg install hs-ShellCheck + "clangd", -- pkg install llvm + "lua_ls", -- pkg install lua-language-server + "prismals", -- npm install -g @prisma/language-server + "vtsls", -- npm install -g @vtsls/language-server }) end, }, -- cgit v1.3 From f47268bdb61ea02f6dc1ece2c699473277107947 Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Tue, 24 Mar 2026 22:09:32 +0100 Subject: Neovim: conform arbeitet unabhängig von LSP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nvim/lua/config/keymaps.lua | 6 ------ nvim/lua/plugins/format.lua | 16 ++++++++++++++-- 2 files changed, 14 insertions(+), 8 deletions(-) (limited to 'nvim/lua') diff --git a/nvim/lua/config/keymaps.lua b/nvim/lua/config/keymaps.lua index b193d5c..29dee94 100644 --- a/nvim/lua/config/keymaps.lua +++ b/nvim/lua/config/keymaps.lua @@ -15,12 +15,6 @@ function M.lsp(buffer, client) map("n", "K", vim.lsp.buf.hover, opts) map("n", "rn", vim.lsp.buf.rename, opts) map("n", "ca", vim.lsp.buf.code_action, opts) - map("n", "cf", function() - require("conform").format({ - async = true, - lsp_fallback = true, - }) - end, opts) local function set_c_bindings() if client and client.name == "clangd" then map("n", "hs", "ClangdSwitchSourceHeader", opts) end diff --git a/nvim/lua/plugins/format.lua b/nvim/lua/plugins/format.lua index 2d6a55c..9010657 100644 --- a/nvim/lua/plugins/format.lua +++ b/nvim/lua/plugins/format.lua @@ -1,12 +1,24 @@ return { "stevearc/conform.nvim", event = { "BufReadPre", "BufNewFile" }, + keys = { + { + "cf", + function() + require("conform").format({ + async = true, + lsp_fallback = true, + }) + end, + desc = "Format file", + }, + }, opts = { formatters_by_ft = { - sh = { "shfmt" }, -- brew install, pkg install shfmt + sh = { "shfmt" }, -- brew install, pkg install shfmt bash = { "shfmt" }, python = { "ruff_format", "black" }, -- brew install ruff, pkg install ruff - lua = { "stylua" }, -- brew install stylua, pkg install stylua + lua = { "stylua" }, -- brew install stylua, pkg install stylua typescript = { "prettierd", "prettier" }, javascript = { "prettierd", "prettier" }, json = { "jq" }, -- brew install jq, pkg install jq -- cgit v1.3