From 2235d045d4765571f35543be71d25b16418057df Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Thu, 8 Jan 2026 14:52:12 +0100 Subject: Neovim: Typescript Optionen --- nvim/ftplugin/typescript.lua | 6 ++++++ nvim/lua/config/keymaps.lua | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 nvim/ftplugin/typescript.lua diff --git a/nvim/ftplugin/typescript.lua b/nvim/ftplugin/typescript.lua new file mode 100644 index 0000000..0883a50 --- /dev/null +++ b/nvim/ftplugin/typescript.lua @@ -0,0 +1,6 @@ +local opt = vim.opt_local + +opt.expandtab = true +opt.shiftwidth = 2 +opt.tabstop = 2 +opt.softtabstop = 2 diff --git a/nvim/lua/config/keymaps.lua b/nvim/lua/config/keymaps.lua index 41958ad..6cc998d 100644 --- a/nvim/lua/config/keymaps.lua +++ b/nvim/lua/config/keymaps.lua @@ -15,7 +15,9 @@ 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() vim.lsp.buf.format({ async = true; }) end, opts) + map("n", "cf", function() + vim.lsp.buf.format({ async = true; }) + end, opts) if client and client.name == "clangd" then map("n", "hs", "ClangdSwitchSourceHeader", opts) -- cgit v1.3