QOL mapping added
This commit is contained in:
@@ -26,9 +26,9 @@
|
||||
"nvim-tmux-navigation": { "branch": "main", "commit": "d9efffa413a530bdea3783af4fea86be84940283" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "8cd2b230174efbf7b5d9f49fe2f90bda6b5eb16e" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "db0c864375c198cacc171ff373e76bfce2a85045" },
|
||||
"plenary": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "59659093581aad2afacedc81f009ed6a4bfad275" }
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
vim.g.mapleader = " "
|
||||
vim.keymap.set("n", "<leader>n", vim.cmd.Ex)
|
||||
|
||||
-- Prime said this is greated remap ever
|
||||
-- Prime said this is greatest remap ever
|
||||
vim.keymap.set("x", "<leader>p", [["_dP]])
|
||||
|
||||
-- some next greatest remaps
|
||||
@@ -42,16 +42,20 @@ vim.api.nvim_create_autocmd("LspAttach", {
|
||||
|
||||
local keymap = vim.keymap
|
||||
|
||||
keymap.set("n", "K", vim.lsp.buf.hover, opts)
|
||||
|
||||
keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
|
||||
|
||||
keymap.set("n", "gD", function() vim.lsp.buf.declaration() end, opts)
|
||||
|
||||
keymap.set("n", "gi", function() vim.lsp.buf.implementation() end, opts)
|
||||
|
||||
keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, opts)
|
||||
|
||||
keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
|
||||
|
||||
keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts)
|
||||
|
||||
keymap.set("n", "K", vim.lsp.buf.hover, opts)
|
||||
|
||||
keymap.set("n", "<leader>rr", function() vim.lsp.buf.references() end, opts)
|
||||
|
||||
keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
|
||||
|
||||
@@ -4,7 +4,12 @@ return{
|
||||
version = "*",
|
||||
dependencies = "nvim-tree/nvim-web-devicons",
|
||||
config = function()
|
||||
require("bufferline").setup{}
|
||||
require("bufferline").setup{
|
||||
options={
|
||||
always_show_bufferline = false,
|
||||
diagnostics = "nvim_lsp",
|
||||
}
|
||||
}
|
||||
end
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
return{
|
||||
|
||||
"nvim-lua/plenary.nvim",
|
||||
|
||||
"github/copilot.vim",
|
||||
|
||||
|
||||
{
|
||||
"nvim-lua/plenary.nvim",
|
||||
name = "plenary",
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = function()
|
||||
require("gitsigns").setup()
|
||||
end
|
||||
},
|
||||
|
||||
"github/copilot.vim",
|
||||
|
||||
"lewis6991/gitsigns.nvim",
|
||||
|
||||
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
config = function()
|
||||
|
||||
@@ -69,6 +69,17 @@ return {
|
||||
},
|
||||
})
|
||||
end,
|
||||
|
||||
["tsserver"] = function()
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
lspconfig.tsserver.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = function(client)
|
||||
client.resolved_capabilities.document_formatting = true
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ return {
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup ({
|
||||
ensure_installed = { "cpp", "typescript", "c", "python" },
|
||||
ensure_installed = { "cpp", "typescript", "tsx", "c", "python" },
|
||||
|
||||
sync_install = false,
|
||||
|
||||
@@ -12,9 +12,12 @@ return {
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
})
|
||||
end
|
||||
},
|
||||
|
||||
@@ -11,11 +11,11 @@ return{
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", "[d", function()
|
||||
require("trouble").next({ skip_groups = ture, jump = true })
|
||||
require("trouble").next({ skip_groups = true, jump = true })
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", "]d", function()
|
||||
require("trouble").previous({ skip_groups = ture, jump = true })
|
||||
require("trouble").previous({ skip_groups = true, jump = true })
|
||||
end)
|
||||
end
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user