feat: real improvements on remaps + organization

This commit is contained in:
2026-07-11 00:54:33 +02:00
parent 2c15d04597
commit 06e6665f52
8 changed files with 374 additions and 385 deletions

View File

@@ -25,7 +25,7 @@ vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,
-- ╭─────────────╮
-- │ Colorscheme │
-- ╰─────────────╯
vim.cmd("colorscheme komau") -- rose-pine, gruvbox, koda-{dark/light/moss/glade}, komau
vim.cmd("colorscheme rose-pine") -- rose-pine, gruvbox, koda-{dark/light/moss/glade}, komau
vim.o.background = "dark" -- "dark" or "light"
-- ╭───────────────────╮
@@ -36,12 +36,12 @@ vim.cmd("set clipboard=unnamedplus")
-- ╭───────╮
-- │ Chars │
-- ╰───────╯
-- vim.opt.fillchars = {
-- horiz = "-",
-- vert = "▏", -- │ ▎▍▌▋▊▉█
-- stl = " ",
-- eob = " ",
-- }
vim.opt.fillchars = {
-- horiz = "-",
-- vert = "▏", -- │ ▎▍▌▋▊▉█
stl = " ",
eob = " ",
}
vim.opt.listchars = {
tab = "> ",
trail = " ",
@@ -52,8 +52,21 @@ vim.fn.sign_define("DiagnosticSignWarn", { text = " ", texthl = "DiagnosticSi
vim.fn.sign_define("DiagnosticSignInfo", { text = "", texthl = "DiagnosticSignInfo" })
vim.fn.sign_define("DiagnosticSignHint", { text = "󰌵", texthl = "DiagnosticSignHint" })
-- ╭─────────────────────╮
-- │ IA initial disables │
-- ╰─────────────────────╯
vim.b.copilot_enabled = false
vim.g.copilot_enabled = false
vim.diagnostic.config({
virtual_text = false, -- floating text next to code is too noisy
underline = true,
signs = {
text = {
[vim.diagnostic.severity.ERROR] = "",
[vim.diagnostic.severity.WARN] = "",
[vim.diagnostic.severity.INFO] = "",
[vim.diagnostic.severity.HINT] = "󰌵",
},
linehl = {
[vim.diagnostic.severity.ERROR] = "ErrorMsg",
},
numhl = {
[vim.diagnostic.severity.WARN] = "WarningMsg",
},
},
})

View File

@@ -1,6 +1,15 @@
vim.g.mapleader = " "
local map = vim.keymap.set
-- <leader> + :
-- B{uffers}
-- F{ind}
-- T{toggle}
-- G{it}
-- E{xplorer}
-- N{ew}
-- W{indow}
---- Bufferline ----
-- Not used but maybe in the future
-- map("n", "bg", "<CMD>BufferLinePick<CR>")
@@ -141,16 +150,25 @@ map("n", "<leader>fo", "<cmd> Telescope oldfiles <CR>", { desc = "Fild old files
map("n", "<leader>fz", "<cmd> Telescope current_buffer_fuzzy_find <CR>", { desc = "Find in current buffer" })
map("n", "<C-/>", "<cmd> Telescope current_buffer_fuzzy_find <CR>", { desc = "Find in current buffer" })
-- Flash search (better "f")
map({ "n", "x", "o" }, "s", function()
require("flash").jump()
end, { desc = "Flash jump in file" })
map({ "n", "x", "o" }, "S", function()
require("flash").treesitter()
end, { desc = "Flash jump in file" })
---- Replace ----
map("n", "<leader>/", "<cmd> GrugFar <CR>", { desc = "Find in current buffer" })
map("n", "<leader>/", "<cmd> GrugFar <CR>", { desc = "Find and replace" })
map("n", "<leader>fr", "<cmd> GrugFar <CR>", { desc = "Find and replace" })
-----------------------------------------------------------
-- better up/down
-- map({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { desc = "Down", expr = true, silent = true })
-- map({ "n", "x" }, "<Down>", "v:count == 0 ? 'gj' : 'j'", { desc = "Down", expr = true, silent = true })
-- map({ "n", "x" }, "k", "v:count == 0 ? 'gk' : 'k'", { desc = "Up", expr = true, silent = true })
-- map({ "n", "x" }, "<Up>", "v:count == 0 ? 'gk' : 'k'", { desc = "Up", expr = true, silent = true })
map({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { desc = "Down", expr = true, silent = true })
map({ "n", "x" }, "<Down>", "v:count == 0 ? 'gj' : 'j'", { desc = "Down", expr = true, silent = true })
map({ "n", "x" }, "k", "v:count == 0 ? 'gk' : 'k'", { desc = "Up", expr = true, silent = true })
map({ "n", "x" }, "<Up>", "v:count == 0 ? 'gk' : 'k'", { desc = "Up", expr = true, silent = true })
---- Movement ----
@@ -222,6 +240,7 @@ map("n", "]w", diagnostic_goto(true, "WARN"), { desc = "Next Warning" })
map("n", "[w", diagnostic_goto(false, "WARN"), { desc = "Prev Warning" })
---- Toggle options ----
map("n", "<leader>ts", "<cmd>ScrollbarToggle<CR>", { desc = "Toggle scrollbar" })
map("n", "<leader>um", function()
require("monkey-alert").enable() -- does not toggle :O
end, { desc = "Toggle monkey alert" })

View File

@@ -25,42 +25,9 @@ return {
"saghen/blink.cmp",
dependencies = { "rafamadriz/friendly-snippets" },
version = "1.*",
-- build = "cargo build --release",
opts = {
-- C-e: Hide menu
-- C-k: Toggle signature help (if signature.enabled = true)
keymap = {
preset = "default",
["<Enter>"] = { "accept", "fallback" },
["<Tab>"] = { "select_next", "fallback" },
["<S-Tab>"] = { "select_prev", "fallback" },
},
appearance = {
nerd_font_variant = "mono",
},
completion = {
accept = { auto_brackets = { enabled = false } },
list = { selection = { preselect = false, auto_insert = true } },
menu = {
auto_show = true,
-- nvim-cmp style menu
draw = {
columns = {
{ "label", "label_description", gap = 1 },
{ "kind_icon", "kind" },
},
},
},
-- Show documentation when selecting a completion item
documentation = { auto_show = true, auto_show_delay_ms = 500 },
-- Display a preview of the selected item on the current line
ghost_text = { enabled = true },
},
sources = {},
fuzzy = { implementation = "prefer_rust_with_warning" },
},
opts = function()
return require("plugins.opts.blink")
end,
opts_extend = { "sources.default" },
},

View File

@@ -0,0 +1,34 @@
return {
-- C-k: Toggle signature help (if signature.enabled = true)
keymap = {
preset = "default",
["<Enter>"] = { "accept", "fallback" },
["<Tab>"] = { "select_next", "fallback" },
["<S-Tab>"] = { "select_prev", "fallback" },
},
appearance = {
nerd_font_variant = "mono",
},
completion = {
accept = { auto_brackets = { enabled = false } },
list = { selection = { preselect = false, auto_insert = true } },
menu = {
auto_show = true,
-- nvim-cmp style menu
draw = {
columns = {
{ "label", "label_description", gap = 1 },
{ "kind_icon", "kind" },
},
},
},
-- Show documentation when selecting a completion item
documentation = { auto_show = true, auto_show_delay_ms = 500 },
-- Display a preview of the selected item on the current line
ghost_text = { enabled = true },
},
sources = {},
fuzzy = { implementation = "prefer_rust_with_warning" },
}

View File

@@ -17,10 +17,10 @@ local config = {
},
diagnostics = {
symbols = {
hint = "H",
info = "I",
warn = "!",
error = "X",
hint = "󰌵",
info = "",
warn = "",
error = "",
},
highlights = {
hint = "DiagnosticSignHint",

View File

@@ -34,7 +34,7 @@ return {
highlight = "Search",
},
Error = {
text = { "-", "x" },
text = { "-", "" },
priority = 2,
gui = nil,
color = nil,
@@ -43,7 +43,7 @@ return {
highlight = "DiagnosticVirtualTextError",
},
Warn = {
text = { "-", "!" },
text = { "-", "" },
priority = 3,
gui = nil,
color = nil,
@@ -61,7 +61,7 @@ return {
highlight = "DiagnosticVirtualTextInfo",
},
Hint = {
text = { "-", "=" },
text = { "-", "󰌵" },
priority = 5,
gui = nil,
color = nil,

View File

@@ -33,50 +33,6 @@ return {
{
"folke/flash.nvim",
event = "VeryLazy",
---@type Flash.Config
opts = {},
keys = {
{
"s",
mode = { "n", "x", "o" },
function()
require("flash").jump()
end,
desc = "Flash",
},
{
"S",
mode = { "n", "x", "o" },
function()
require("flash").treesitter()
end,
desc = "Flash Treesitter",
},
{
"r",
mode = "o",
function()
require("flash").remote()
end,
desc = "Remote Flash",
},
{
"R",
mode = { "o", "x" },
function()
require("flash").treesitter_search()
end,
desc = "Treesitter Search",
},
{
"<c-s>",
mode = { "c" },
function()
require("flash").toggle()
end,
desc = "Toggle Flash Search",
},
},
},
{
"MagicDuck/grug-far.nvim",

View File

@@ -2,14 +2,14 @@
-- │ Styling │
-- ╰─────────╯
return {
-- {
-- dir = "~/Documents/Code/plain-colors.nvim",
-- -- "rose-pine/neovim",
-- name = "rose-pine",
-- opts = {
-- variant = "darker", -- dark, light, darker | dawn
-- },
-- },
{
dir = "~/Documents/Code/plain-colors.nvim",
-- "rose-pine/neovim",
name = "rose-pine",
opts = {
variant = "darker", -- dark, light, darker | dawn
},
},
{
"dqnid/komau.vim",
-- dir = "~/Documents/Code/komau.vim",