diff options
| author | Thomas Schmucker <ts@its1.de> | 2026-01-08 14:52:12 +0100 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2026-01-08 14:52:12 +0100 |
| commit | 2235d045d4765571f35543be71d25b16418057df (patch) | |
| tree | ee616c32db82d97cba4b48796ccf93ce24bc1a50 /nvim | |
| parent | e0a4675dcb4cc0ee529243c4fff47549029cee0a (diff) | |
| download | dotfiles-2235d045d4765571f35543be71d25b16418057df.tar.gz dotfiles-2235d045d4765571f35543be71d25b16418057df.tar.bz2 dotfiles-2235d045d4765571f35543be71d25b16418057df.zip | |
Neovim: Typescript Optionen
Diffstat (limited to 'nvim')
| -rw-r--r-- | nvim/ftplugin/typescript.lua | 6 | ||||
| -rw-r--r-- | nvim/lua/config/keymaps.lua | 4 |
2 files changed, 9 insertions, 1 deletions
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 @@ | |||
| 1 | local opt = vim.opt_local | ||
| 2 | |||
| 3 | opt.expandtab = true | ||
| 4 | opt.shiftwidth = 2 | ||
| 5 | opt.tabstop = 2 | ||
| 6 | 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) | |||
| 15 | map("n", "K", vim.lsp.buf.hover, opts) | 15 | map("n", "K", vim.lsp.buf.hover, opts) |
| 16 | map("n", "<leader>rn", vim.lsp.buf.rename, opts) | 16 | map("n", "<leader>rn", vim.lsp.buf.rename, opts) |
| 17 | map("n", "<leader>ca", vim.lsp.buf.code_action, opts) | 17 | map("n", "<leader>ca", vim.lsp.buf.code_action, opts) |
| 18 | map("n", "<leader>cf", function() vim.lsp.buf.format({ async = true; }) end, opts) | 18 | map("n", "<leader>cf", function() |
| 19 | vim.lsp.buf.format({ async = true; }) | ||
| 20 | end, opts) | ||
| 19 | 21 | ||
| 20 | if client and client.name == "clangd" then | 22 | if client and client.name == "clangd" then |
| 21 | map("n", "<leader>hs", "<cmd>ClangdSwitchSourceHeader<cr>", opts) | 23 | map("n", "<leader>hs", "<cmd>ClangdSwitchSourceHeader<cr>", opts) |
