added keybindings for easy tab navigation (see lua/409/remap.lua), fixed

goto definition delay
This commit is contained in:
2024-04-06 04:23:06 +02:00
parent 804f09d0de
commit 8232705e64
4 changed files with 57 additions and 34 deletions

View File

@@ -62,7 +62,7 @@ vim.api.nvim_create_autocmd("LspAttach", {
callback = function(args)
local bufnr = args.buf
local opts = { buffer = bufnr, remap = false }
local opts = { buffer = bufnr, remap = false, nowait = true }
vim.keymap.set("n", "gd", function()
vim.lsp.buf.definition()

View File

@@ -1,29 +1,47 @@
require 'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all" (the five listed parsers should always be installed)
ensure_installed = { "javascript", "typescript", "c", "lua", "vim", "vimdoc", "query", "c_sharp", "css", "gitcommit", "html", "svelte", "yaml", "astro", "toml", "jsdoc", "json" },
require("nvim-treesitter.configs").setup({
-- A list of parser names, or "all" (the five listed parsers should always be installed)
ensure_installed = {
"javascript",
"typescript",
"c",
"lua",
"vim",
"vimdoc",
"query",
"c_sharp",
"css",
"gitcommit",
"html",
"svelte",
"yaml",
"astro",
"toml",
"jsdoc",
"json",
},
tree_docs = {
enable = true
},
tree_docs = {
enable = true,
},
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = true,
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = true,
highlight = {
enable = true,
highlight = {
enable = true,
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
indent = {
enable = true,
disable = { 'yaml' }
}
}
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
indent = {
enable = true,
disable = { "yaml" },
},
})

View File

@@ -34,10 +34,15 @@ vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><
vim.keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>", { silent = true })
vim.keymap.set("n", "<leader><leader>", function()
vim.cmd("so")
vim.cmd("so")
end)
vim.keymap.set({ "n", "x" }, "<C-h>", "<cmd> TmuxNavigateLeft<CR>");
vim.keymap.set({ "n", "x" }, "<C-l>", "<cmd> TmuxNavigateRight<CR>");
vim.keymap.set({ "n", "x" }, "<C-j>", "<cmd> TmuxNavigateDown<CR>");
vim.keymap.set({ "n", "x" }, "<C-k>", "<cmd> TmuxNavigateUp<CR>");
vim.keymap.set({ "n", "x" }, "<C-h>", "<cmd> TmuxNavigateLeft<CR>")
vim.keymap.set({ "n", "x" }, "<C-l>", "<cmd> TmuxNavigateRight<CR>")
vim.keymap.set({ "n", "x" }, "<C-j>", "<cmd> TmuxNavigateDown<CR>")
vim.keymap.set({ "n", "x" }, "<C-k>", "<cmd> TmuxNavigateUp<CR>")
vim.keymap.set("n", "<Tab>", "gt")
vim.keymap.set("n", "<S-Tab>", "gT")
vim.keymap.set("n", "<A-Tab>", "<cmd>:tabclose<CR>")
vim.keymap.set("n", "<leader><Tab>", "<cmd>:tabnew<CR>")

View File

@@ -254,14 +254,14 @@ _G.packer_plugins = {
}
time([[Defining packer_plugins]], false)
-- Config for: Comment.nvim
time([[Config for Comment.nvim]], true)
try_loadstring("\27LJ\2\n5\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\fComment\frequire\0", "config", "Comment.nvim")
time([[Config for Comment.nvim]], false)
-- Config for: barbecue.nvim
time([[Config for barbecue.nvim]], true)
try_loadstring("\27LJ\2\n6\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\rbarbecue\frequire\0", "config", "barbecue.nvim")
time([[Config for barbecue.nvim]], false)
-- Config for: Comment.nvim
time([[Config for Comment.nvim]], true)
try_loadstring("\27LJ\2\n5\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\fComment\frequire\0", "config", "Comment.nvim")
time([[Config for Comment.nvim]], false)
_G._packer.inside_compile = false
if _G._packer.needs_bufread == true then