chore(nvim): few tweaks

This commit is contained in:
Afonso Franco 2024-12-28 22:14:20 +00:00
parent 236e096051
commit ee0e04842b
Signed by: afonso
SSH key fingerprint: SHA256:gkVPzsQQJzqi21ntQBV6pXTx4bYI53rFGI4XtvCpwd4
5 changed files with 29 additions and 11 deletions

View file

@ -23,3 +23,9 @@ vim.keymap.set("n", "G", "Gzz", {desc = "Center cursor after moving down half-pa
vim.keymap.set("n", "<space><space>x", "<cmd>source %<CR>")
vim.keymap.set("n", "<space>x", ":.lua<CR>")
vim.keymap.set("v", "<space>x", ":lua<CR>")
--Merge lines in visual mode
vim.keymap.set("v", "J", function()
for _ = 1, vim.fn.getpos("'>")[2] - vim.fn.getpos("'<")[2] - 1 do
vim.api.nvim_command("normal! J")
end
end)

View file

@ -3,7 +3,7 @@ return {
'saghen/blink.cmp',
lazy = false,
dependencies = 'rafamadriz/friendly-snippets',
build = 'cargo build --release',
version = "*",
opts = {
keymap = {
preset = 'default',

View file

@ -181,7 +181,8 @@ return {
markdown = { "mdformat" },
rust = { "rustfmt" },
go = { "gofmt" },
json = { "jq" }
json = { "jq" },
bash = { "shfmt" }
}
})
end,

View file

@ -47,5 +47,12 @@ return {
require("blame").setup()
end
},
"tpope/vim-fugitive"
"tpope/vim-fugitive",
-- {
-- "nvzone/typr",
-- dependencies = {
-- "nvzone/volt"
-- },
-- opts = {}
-- }
}

View file

@ -84,13 +84,17 @@ return {
table.insert(newVirtText, { suffix, 'MoreMsg' })
return newVirtText
end
-- global handler
-- `handler` is the 2nd parameter of `setFoldVirtTextHandler`,
-- check out `./lua/ufo.lua` and search `setFoldVirtTextHandler` for detail.
require('ufo').setup({
fold_virt_text_handler = handler
})
end
},
{
"OXY2DEV/markview.nvim",
ft = "markdown",
dependencies = {
"nvim-treesitter/nvim-treesitter",
"nvim-tree/nvim-web-devicons"
}
}
}