[neovim] Yes

This commit is contained in:
seajee
2026-01-09 20:54:16 +01:00
parent 68360cf475
commit a2d6d1d729
3 changed files with 44 additions and 399 deletions

View File

@@ -70,7 +70,7 @@ map("n", "<leader>tl", ":tablast<CR>")
-- Buffers
map("n", "<leader>n", ":enew<CR>")
map("n", "<leader>bd", ":bdelete<CR>")
map("n", "<leader>db", ":bdelete<CR>")
map("n", "<TAB>", ":bnext<CR>")
map("n", "<S-TAB>", ":bprevious<CR>")
map("n", "<leader>\\", ":buffer term<CR>")
@@ -104,38 +104,17 @@ map("n", "<M-Left>", "<cmd>vertical resize -2<CR>")
map("n", "<M-Right>", "<cmd>vertical resize +2<CR>")
-- Listchars
local listchars = {
opt.listchars = {
-- eol = "$",
tab = "» ",
space = "·",
trail = "-"
}
opt.listchars = listchars
vim.api.nvim_set_hl(0, "NonText", { fg = "#303030" })
vim.api.nvim_set_hl(0, "Whitespace", { fg = "#303030" })
cmd.match([[TrailingWhitespace /\s\+$/]])
-- Toggle listchars
map("n", "<leader>lc", function()
vim.wo.list = not vim.wo.list
if vim.wo.list then
vim.api.nvim_set_hl(0, "TrailingWhitespace", { link = "Error" })
else
vim.api.nvim_set_hl(0, "TrailingWhitespace", { link = "Whitespace" })
end
end)
vim.api.nvim_create_autocmd({ "InsertEnter", "TermEnter" }, {
callback = function()
opt.listchars.trail = nil
vim.api.nvim_set_hl(0, "TrailingWhitespace", { link = "Whitespace" })
end
})
vim.api.nvim_create_autocmd({ "InsertLeave", "TermLeave" }, {
callback = function()
opt.listchars.trail = listchars.space
vim.api.nvim_set_hl(0, "TrailingWhitespace", { link = "Error" })
end
})
-- [[ PLUGINS ]] --
@@ -162,19 +141,14 @@ opt.rtp:prepend(lazypath)
-- Plugins
require("lazy").setup({
-- Colorscheme
{
"blazkowolf/gruber-darker.nvim",
opts = {
italic = {
strings = false,
comments = false,
}
}
},
{ "vague-theme/vague.nvim" },
-- Background trasparency
{ "xiyaowong/transparent.nvim" },
-- Treesitter
{ "nvim-treesitter/nvim-treesitter" },
-- Fuzzy finder
{ "echasnovski/mini.pick", opts = {} },
@@ -189,15 +163,44 @@ require("lazy").setup({
{ "Vonr/align.nvim", branch = "v2" },
-- Multi cursor
{ "brenton-leighton/multiple-cursors.nvim", opts = {} }
{ "brenton-leighton/multiple-cursors.nvim", opts = {} },
-- Trailing whitespace
{
"kaplanz/retrail.nvim",
opts = {
hlgroup = "Error",
trim = {
auto = false, -- Auto trim on BufWritePre
}
}
},
-- Indent blankline
{ "lukas-reineke/indent-blankline.nvim", main = "ibl", opts = {} },
-- File tree
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"nvim-tree/nvim-web-devicons",
},
lazy = false, -- neo-tree will lazily load itself
opts = {
window = {
width = 32
}
}
}
})
-- Colorscheme
cmd.colorscheme("gruber-darker")
cmd.colorscheme("vague")
-- Plugin keymaps
map("n", "<leader>bt", ":TransparentToggle<CR>")
map("n", "<leader>f", ":Pick files<CR>")
map("n", "<leader>b", ":Pick buffers<CR>")
@@ -219,4 +222,8 @@ map({ "n", "i", "x" }, "<C-Down>", "<cmd>MultipleCursorsAddDown<CR>")
map({ "n", "i" }, "<C-LeftMouse>", "<cmd>MultipleCursorsMouseAddDelete<CR>")
map({ "n", "v", "x" }, "<C-l>", "<cmd>MultipleCursorsAddJumpNextMatch<CR>")
map({ "n", "x" }, "<leader>D", "<cmd>MultipleCursorsJumpNextMatch<CR>")
map("n", "<leader>|", function() require("multiple-cursors").align() end)
map("n", "<leader>|", function()
require("multiple-cursors").align()
end)
map("n", "<leader>p", "<cmd>Neotree toggle<CR>")