mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 08:41:43 +05:30
NVIM:
- fix: Name of autocommands for JS keymaps fixed - feature: Trigger code action on <Ctrl+.> just like VS Code
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
-- Enable spell check on markdown and text files
|
-- Enable keymaps that are specific to only a certain LSP
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
group = vim.api.nvim_create_augroup("keymaps-csharp-omnisharp", { clear = true }),
|
group = vim.api.nvim_create_augroup("keymaps-javascript", { clear = true }),
|
||||||
pattern = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx", "vue", "svelte", "astro" },
|
pattern = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx", "vue", "svelte", "astro" },
|
||||||
callback = function()
|
callback = function()
|
||||||
-- vim.keymap.set({ "n", "v" }, "<leader>ca", "<cmd>OmniSharpGetCodeActions<CR>", { desc = "Code: Code Actions (C#)" })
|
-- vim.keymap.set({ "n", "v" }, "<leader>ca", "<cmd>OmniSharpGetCodeActions<CR>", { desc = "Code: Code Actions (C#)" })
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ local on_attach = function(_, bufnr)
|
|||||||
|
|
||||||
nmap("<leader>cr", vim.lsp.buf.rename, "Rename Symbol")
|
nmap("<leader>cr", vim.lsp.buf.rename, "Rename Symbol")
|
||||||
nmap("<leader>ca", vim.lsp.buf.code_action, "Code Action")
|
nmap("<leader>ca", vim.lsp.buf.code_action, "Code Action")
|
||||||
|
nmap("<C-.>", vim.lsp.buf.code_action, "Code Action: VSCode Style")
|
||||||
-- See `:help K` for why this keymap
|
-- See `:help K` for why this keymap
|
||||||
-- nmap("K", vim.lsp.buf.hover, "Hover Documentation")
|
-- nmap("K", vim.lsp.buf.hover, "Hover Documentation")
|
||||||
-- nmap("<C-k>", vim.lsp.buf.signature_help, "Signature Documentation")
|
-- nmap("<C-k>", vim.lsp.buf.signature_help, "Signature Documentation")
|
||||||
|
|||||||
Reference in New Issue
Block a user