diff options
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) |
