Compare commits
No commits in common. "864d76ed7df72cd47d6945f74186d16012bc6ad2" and "66d4b793b7f10dba7cc50b929cb8742d91763acc" have entirely different histories.
864d76ed7d
...
66d4b793b7
@ -6,9 +6,7 @@ vim.diagnostic.config({
|
||||
|
||||
lsp.on_attach(function(client, bufnr)
|
||||
lsp.default_keymaps({buffer = bufnr})
|
||||
-- Set tagfunc back to empty instead of vim.lsp.tagfunc(),
|
||||
-- to use default tag jumping behaviour withouth going through the lsp.
|
||||
-- - see https://neovim.io/doc/user/lsp.html
|
||||
-- set tagfunc to empty to use default tag jumpingn behaviour withouth going through the lsp
|
||||
vim.opt.tagfunc = ""
|
||||
end)
|
||||
|
||||
|
@ -1,48 +1,5 @@
|
||||
vim.g.mapleader = " "
|
||||
-- fzf intergration
|
||||
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
|
||||
vim.keymap.set("n", "<leader>ff", vim.cmd.Files)
|
||||
vim.keymap.set("n", "<leader>ft", vim.cmd.Tags)
|
||||
vim.keymap.set("n", "<leader>fr", vim.cmd.Rg)
|
||||
--
|
||||
-- Vim argument list bindings
|
||||
--
|
||||
-- Generate list of arg action callbacks, which then executes vim.cmd.args()
|
||||
-- to show argument list aftter performing normal argument action
|
||||
--
|
||||
-- pcall() is used to catch errors, but not do anything with them
|
||||
local arg_actions = {
|
||||
"argu",
|
||||
"next",
|
||||
"prev",
|
||||
"first",
|
||||
"last",
|
||||
}
|
||||
local arg_action = {}
|
||||
for _, action in ipairs(arg_actions) do
|
||||
arg_action[action] = function()
|
||||
pcall(vim.cmd, action)
|
||||
vim.cmd.args()
|
||||
end
|
||||
end
|
||||
-- Generate list of callbacks that execute argu n from n = 1 to 4
|
||||
-- argu_n[n] is a function that executes vim.cmd.argu(n)
|
||||
local argu_n = {}
|
||||
for n = 1, 4 do
|
||||
argu_n[n] = function()
|
||||
pcall(vim.cmd.argu, {n, bang=true})
|
||||
vim.cmd.args()
|
||||
end
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<leader>a", vim.cmd.args)
|
||||
vim.keymap.set("n", "<leader>u", arg_action["argu"])
|
||||
vim.keymap.set("n", "<leader>an", arg_action["next"])
|
||||
vim.keymap.set("n", "<leader>ap", arg_action["prev"])
|
||||
vim.keymap.set("n", "<leader>af", arg_action["first"])
|
||||
vim.keymap.set("n", "<leader>al", arg_action["last"])
|
||||
vim.keymap.set("n", "<leader>aa", argu_n[1])
|
||||
vim.keymap.set("n", "<leader>ra", argu_n[1])
|
||||
vim.keymap.set("n", "<leader>ar", argu_n[2])
|
||||
vim.keymap.set("n", "<leader>as", argu_n[3])
|
||||
vim.keymap.set("n", "<leader>at", argu_n[4])
|
||||
vim.keymap.set("n", "<leader>f", vim.cmd.Files)
|
||||
vim.keymap.set("n", "<leader>t", vim.cmd.Tags)
|
||||
vim.keymap.set("n", "<leader>rg", vim.cmd.Rg)
|
||||
|
@ -14,6 +14,5 @@ vim.opt.undodir = os.getenv("HOME") .. "/.config/nvim/.undodir"
|
||||
vim.opt.undofile = true
|
||||
|
||||
vim.opt.scrolloff = 8
|
||||
-- 'auto:1 sets signcolumn to hide if there is no warning/error etc.
|
||||
-- 'no' disables signcolumn
|
||||
vim.opt.signcolumn = 'no'
|
||||
-- set sign col to hide if there is no warning/error etc.
|
||||
vim.opt.signcolumn = 'auto:1'
|
||||
|
Loading…
Reference in New Issue
Block a user