Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d92312b83c | |||
| a83481d10d | |||
| 9810b20e0b | |||
| d256020251 | |||
| 9c48b3b3a0 | |||
| 44f2c9f887 | |||
| 3b707ada11 | |||
| 7c428386d8 | |||
| cb1a941fe1 | |||
| 5929cd53d7 |
@@ -4,9 +4,4 @@ Neovim configuration
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Install
|
Neovim development environment using neovim 0.12 and native treesitter, LSP, and plugin manager.
|
||||||
|
|
||||||
Run the script `install.sh` to install necessary packages on the operating system (using `yay`) from the file
|
|
||||||
`packages.txt`. This will also download and build the treesitter languages
|
|
||||||
|
|
||||||
- `bash`
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
--[[
|
--[[
|
||||||
|
|
||||||
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
@@ -25,8 +26,8 @@
|
|||||||
| _/ /_____\__ \ || (_| | (__| <
|
| _/ /_____\__ \ || (_| | (__| <
|
||||||
|_|/___| |___/\__\__,_|\___|_|\_\
|
|_|/___| |___/\__\__,_|\___|_|\_\
|
||||||
|
|
||||||
Neovim 0.12 configuration
|
Neovim v0.12 configuration
|
||||||
(c) Frank Zechert 2026
|
(C) Frank Zechert 2026
|
||||||
]]
|
]]
|
||||||
|
|
||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
@@ -38,11 +39,12 @@ vim.loader.enable()
|
|||||||
-- load configuration
|
-- load configuration
|
||||||
require("config.ui")
|
require("config.ui")
|
||||||
require("config.options")
|
require("config.options")
|
||||||
require("config.diagnostic")
|
|
||||||
require("config.treesitter")
|
|
||||||
require("config.autocommands")
|
|
||||||
require("config.keymaps")
|
require("config.keymaps")
|
||||||
|
require("config.autocommands")
|
||||||
|
require("config.diagnostic")
|
||||||
require("config.netrw")
|
require("config.netrw")
|
||||||
|
|
||||||
-- load plugin manager
|
-- load plugins
|
||||||
require("config.lazy")
|
require("plugins")
|
||||||
|
-- load lsp configurations
|
||||||
|
require("lsp")
|
||||||
|
|||||||
+91
-39
@@ -1,5 +1,6 @@
|
|||||||
--[[
|
--[[
|
||||||
|
|
||||||
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
@@ -25,30 +26,34 @@
|
|||||||
| _/ /_____\__ \ || (_| | (__| <
|
| _/ /_____\__ \ || (_| | (__| <
|
||||||
|_|/___| |___/\__\__,_|\___|_|\_\
|
|_|/___| |___/\__\__,_|\___|_|\_\
|
||||||
|
|
||||||
Neovim 0.12 configuration
|
Neovim v0.12 configuration
|
||||||
(c) Frank Zechert 2026
|
(C) Frank Zechert 2026
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local create_group = vim.api.nvim_create_augroup
|
local create_group = vim.api.nvim_create_augroup
|
||||||
local create_cmd = vim.api.nvim_create_autocmd
|
local create_cmd = vim.api.nvim_create_autocmd
|
||||||
local function contains(tbl, value)
|
|
||||||
for _, v in ipairs(tbl) do
|
|
||||||
if v == value then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
-- briefly highlithg text that is yanked
|
-- briefly highlight text that is yanked
|
||||||
create_cmd("TextYankPost", {
|
create_cmd("TextYankPost", {
|
||||||
desc = "Highlight yanked text",
|
desc = "Highlight yanked text",
|
||||||
group = create_group("cmd-highlight-yank", { clear = true }),
|
group = create_group("cmd-highlight-yank", { clear = true }),
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.highlight.on_yank()
|
vim.hl.on_yank()
|
||||||
end,
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- recognize all scripts with bash shebang as bash filetype
|
-- disable list chars in specific file types, e.g. netrw
|
||||||
|
create_cmd("FileType", {
|
||||||
|
desc = "Disable list characters for some filetypes",
|
||||||
|
group = create_group("cmd-disable-listchars", { clear = true }),
|
||||||
|
pattern = { "netrw", "trouble" },
|
||||||
|
callback = function(args)
|
||||||
|
vim.opt_local.list = false
|
||||||
|
vim.opt.textwidth = 0
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
-- when recognizing a bash shebang, switch filetype to bash
|
||||||
create_cmd({"BufRead", "BufNewFile"}, {
|
create_cmd({"BufRead", "BufNewFile"}, {
|
||||||
desc = "Recognize bash shebang as bash filetype",
|
desc = "Recognize bash shebang as bash filetype",
|
||||||
group = create_group("cmd-recognize-bash-filetype", { clear = true }),
|
group = create_group("cmd-recognize-bash-filetype", { clear = true }),
|
||||||
@@ -59,38 +64,85 @@ create_cmd({"BufRead", "BufNewFile"}, {
|
|||||||
if first_line:match("^#!.*/bash") then
|
if first_line:match("^#!.*/bash") then
|
||||||
vim.bo[buf].filetype = "bash"
|
vim.bo[buf].filetype = "bash"
|
||||||
end
|
end
|
||||||
end,
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- disable list chars in specific filetypes, e.g. netrw
|
-- when saving a file, remove trailing whitespace
|
||||||
create_cmd({"FileType"}, {
|
create_cmd("BufWritePre", {
|
||||||
desc = "Disable list chars for some filetypes",
|
desc = "Remove trailing whitespace before saving a file",
|
||||||
pattern = { "netrw" },
|
|
||||||
callback = function(args)
|
|
||||||
vim.opt_local.list = false
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- automatically remove trailing whitespace on save file
|
|
||||||
create_cmd({"BufWritePre"}, {
|
|
||||||
desc = "Remove trailing whitespace when saving",
|
|
||||||
group = create_group("cmd-remove-trailing-whitespace", { clear = true }),
|
group = create_group("cmd-remove-trailing-whitespace", { clear = true }),
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
callback = function(args)
|
callback = function(args)
|
||||||
vim.api.nvim_buf_call(args.buf, function()
|
vim.api.nvim_buf_call(args.buf, function()
|
||||||
vim.cmd([[%s/\s\+$//e]])
|
local cursor = vim.api.nvim_win_get_cursor(0)
|
||||||
|
vim.cmd([[keepjumps keeppatterns silent! %s/\s\+$//e]])
|
||||||
|
vim.api.nvim_win_set_cursor(0, cursor)
|
||||||
end)
|
end)
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
-- highlight trailing whitespace when in normal mode
|
||||||
|
local trailing_hl_group = create_group("cmd-highlight-trailing-whitespace", { clear = true })
|
||||||
|
local trailing_hl_match_ids = {}
|
||||||
|
-- Remove highlight in all non-normal modes
|
||||||
|
create_cmd({"InsertEnter", "CmdlineEnter", "TermEnter" }, {
|
||||||
|
desc = "Remove trailing whitespace highlight in non-normal mode",
|
||||||
|
group = trailing_hl_group,
|
||||||
|
callback = function()
|
||||||
|
local window = vim.api.nvim_get_current_win()
|
||||||
|
local id = trailing_hl_match_ids[window]
|
||||||
|
if id then
|
||||||
|
pcall(vim.fn.matchdelete, id)
|
||||||
|
trailing_hl_match_ids[window] = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
||||||
|
-- Apply highlight in normal mode
|
||||||
|
create_cmd({"InsertLeave", "CmdlineLeave", "TermLeave", "BufEnter", "WinEnter" }, {
|
||||||
|
desc = "Add trailing whitespace highlight in normal mode",
|
||||||
|
group = trailing_hl_group,
|
||||||
|
callback = function()
|
||||||
|
if vim.fn.mode() ~= "n" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local window = vim.api.nvim_get_current_win()
|
||||||
|
local id = trailing_hl_match_ids[window]
|
||||||
|
if id then
|
||||||
|
pcall(vim.fn.matchdelete, id)
|
||||||
|
end
|
||||||
|
trailing_hl_match_ids[window] = vim.fn.matchadd("TrailingWhitespace", [[\s\+$]])
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Open Trouble Quickfix list automatically
|
||||||
|
create_cmd("QuickFixCmdPost", {
|
||||||
|
desc = "Automatically open Quickfix List in Trouble",
|
||||||
|
group = create_group("cmd-quickfix-open-trouble", { clear = true }),
|
||||||
|
callback = function()
|
||||||
|
vim.cmd([[Trouble qflist open]])
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Automatically open diagnostic float when hovering with cursor
|
||||||
|
create_cmd("CursorHold", {
|
||||||
|
desc = "Automatically open Diagnostic Float",
|
||||||
|
group = create_group("cmd-auto-open-diagnostic-float", { clear = true }),
|
||||||
|
callback = function()
|
||||||
|
-- If any floating window exists, do nothing
|
||||||
|
for _, win in ipairs(vim.api.nvim_list_wins()) do
|
||||||
|
local cfg = vim.api.nvim_win_get_config(win)
|
||||||
|
if cfg.relative ~= "" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- Only open if there is a diagnostic under cursor
|
||||||
|
local diags = vim.diagnostic.get(0, { lnum = vim.fn.line('.') - 1 })
|
||||||
|
if #diags == 0 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.diagnostic.open_float(nil, { focus = false, scope = "cursor" })
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- automatically set textwidth if not set otherwise
|
|
||||||
create_cmd({"FileType"}, {
|
|
||||||
desc = "Automatically set textwidth",
|
|
||||||
pattern = "*",
|
|
||||||
callback = function(args)
|
|
||||||
local buf = args.buf
|
|
||||||
if vim.bo[buf].textwidth == 0 then
|
|
||||||
vim.bo[buf].textwidth = vim.g.ui.textwidth[vim.bo[buf].filetype] or vim.g.ui.textwidth.default
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|||||||
+12
-11
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
--[[
|
--[[
|
||||||
|
|
||||||
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
@@ -26,22 +26,23 @@
|
|||||||
| _/ /_____\__ \ || (_| | (__| <
|
| _/ /_____\__ \ || (_| | (__| <
|
||||||
|_|/___| |___/\__\__,_|\___|_|\_\
|
|_|/___| |___/\__\__,_|\___|_|\_\
|
||||||
|
|
||||||
Neovim 0.12 configuration
|
Neovim v0.12 configuration
|
||||||
(c) Frank Zechert 2026
|
(C) Frank Zechert 2026
|
||||||
]]
|
]]
|
||||||
|
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
update_in_insert = false,
|
update_in_insert = false,
|
||||||
severity_sort = true,
|
severity_sort = true,
|
||||||
float = {
|
float = {
|
||||||
border = vim.g.ui.border,
|
border = vim.g.ui.popupborder,
|
||||||
source = true,
|
source = true,
|
||||||
},
|
},
|
||||||
underline = true,
|
-- underline = true,
|
||||||
-- underline = { severity = { min = vim.diagnostic.severity.WARN } },
|
-- underline only from a specified severity level
|
||||||
|
underline = { severity = { min = vim.diagnostic.severity.WARN } },
|
||||||
virtual_text = {
|
virtual_text = {
|
||||||
prefix = vim.g.ui.symbols.diagnostic.virtual_text_prefix,
|
prefix = vim.g.ui.symbols.diagnostic.virtual_text_prefix,
|
||||||
severity = nil, -- show all severity
|
severity = nil, -- show all severities
|
||||||
spacing = 2, -- extra spacing between text and code
|
spacing = 2, -- extra spacing between text and code
|
||||||
virt_text_pos = "eol",
|
virt_text_pos = "eol",
|
||||||
source = "if_many",
|
source = "if_many",
|
||||||
@@ -53,19 +54,19 @@ vim.diagnostic.config({
|
|||||||
INFO = vim.g.ui.symbols.diagnostic.sign_info,
|
INFO = vim.g.ui.symbols.diagnostic.sign_info,
|
||||||
HINT = vim.g.ui.symbols.diagnostic.sign_hint,
|
HINT = vim.g.ui.symbols.diagnostic.sign_hint,
|
||||||
}
|
}
|
||||||
return string.format("%s", diagnostic.message)
|
return string.format("%s: %s", symbols[severity], diagnostic.message)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
},
|
},
|
||||||
virtual_lines = false,
|
virtual_lines = false,
|
||||||
jump = {
|
jump = {
|
||||||
|
-- when jumping to a diagnostic message, automatically open the diagnostic float
|
||||||
on_jump = function(_, bufnr)
|
on_jump = function(_, bufnr)
|
||||||
vim.diagnostic.open_float({
|
vim.diagnostic.open_float({
|
||||||
bufnr = bufnr,
|
bufnr = bufnr,
|
||||||
scope = 'cursor',
|
scope = "cursor",
|
||||||
focus = false
|
focus = false
|
||||||
})
|
})
|
||||||
end,
|
end
|
||||||
},
|
},
|
||||||
signs = {
|
signs = {
|
||||||
-- icons in sign column
|
-- icons in sign column
|
||||||
|
|||||||
+51
-20
@@ -1,5 +1,6 @@
|
|||||||
--[[
|
--[[
|
||||||
|
|
||||||
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
@@ -25,34 +26,31 @@
|
|||||||
| _/ /_____\__ \ || (_| | (__| <
|
| _/ /_____\__ \ || (_| | (__| <
|
||||||
|_|/___| |___/\__\__,_|\___|_|\_\
|
|_|/___| |___/\__\__,_|\___|_|\_\
|
||||||
|
|
||||||
Neovim 0.12 configuration
|
Neovim v0.12 configuration
|
||||||
(c) Frank Zechert 2026
|
(C) Frank Zechert 2026
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local map = vim.keymap.set
|
local map = vim.keymap.set
|
||||||
|
|
||||||
-- Pressing ESC twices leaves terminal mode
|
-- pressing ESC twices leaves terminal mode
|
||||||
map("t", "<Esc><Esc>", "<C-\\><C-n>", { desc = "exit terminanl" })
|
map("t", "<Esc><Esc>", "<C-\\><C-n>", { desc = "Exit Terminal Mode" })
|
||||||
|
|
||||||
-- Pressing ESC removes search highlights
|
-- pressing ESC removes search highlights
|
||||||
map("n", "<Esc>", "<Cmd>nohlsearch<Cr>")
|
map("n", "<Esc>", "<Cmd>nohlsearch<CR>", { desc = "Remove search result highlights" })
|
||||||
|
|
||||||
-- Smart buffer switch (to alternative, previous, or next) if possible
|
-- Smart buffer switch
|
||||||
|
-- switch to the alternative buffer ("#"), if not available, switch to the
|
||||||
|
-- previous buffer, if not possible, switch to the next buffer
|
||||||
local function smart_buffer_switch(current)
|
local function smart_buffer_switch(current)
|
||||||
local alternative = vim.fn.bufnr("#")
|
local alternative = vim.fn.bufnr("#")
|
||||||
|
|
||||||
-- get all listed buffers
|
|
||||||
local buffers = vim.fn.getbufinfo({ buflisted = 1 })
|
local buffers = vim.fn.getbufinfo({ buflisted = 1 })
|
||||||
|
|
||||||
-- find index of the current buffer
|
|
||||||
local current_index = nil
|
local current_index = nil
|
||||||
for index, buffer in ipairs(buffers) do
|
for index, buffer in ipairs(buffers) do
|
||||||
if buffer.bufnr == current then
|
if buffer.bufnr == current then
|
||||||
current_index = i
|
current_index = index
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- try to switch to alternate buffer
|
-- try to switch to alternate buffer
|
||||||
if alternative > 0 and vim.fn.buflisted(alternative) == 1 and alternative ~= current then
|
if alternative > 0 and vim.fn.buflisted(alternative) == 1 and alternative ~= current then
|
||||||
vim.api.nvim_set_current_buf(alternative)
|
vim.api.nvim_set_current_buf(alternative)
|
||||||
@@ -68,35 +66,68 @@ end
|
|||||||
local function smart_buffer_delete()
|
local function smart_buffer_delete()
|
||||||
local current = vim.api.nvim_get_current_buf()
|
local current = vim.api.nvim_get_current_buf()
|
||||||
smart_buffer_switch(current)
|
smart_buffer_switch(current)
|
||||||
-- delete current buffer
|
|
||||||
vim.cmd(":confirm bdelete " .. current)
|
vim.cmd(":confirm bdelete " .. current)
|
||||||
end
|
end
|
||||||
map("n", "<leader>bd", smart_buffer_delete, { desc = "Close Current Buffer" })
|
|
||||||
|
|
||||||
local function smart_buffer_wipeout()
|
local function smart_buffer_wipeout()
|
||||||
local current = vim.api.nvim_get_current_buf()
|
local current = vim.api.nvim_get_current_buf()
|
||||||
smart_buffer_switch(current)
|
smart_buffer_switch(current)
|
||||||
-- delete current buffer
|
|
||||||
vim.cmd(":confirm bwipeout " .. current)
|
vim.cmd(":confirm bwipeout " .. current)
|
||||||
end
|
end
|
||||||
map("n", "<leader>bw", smart_buffer_wipeout, { desc = "Wipeout Current Buffer" })
|
|
||||||
|
|
||||||
local function delete_other_buffers()
|
local function delete_other_buffers()
|
||||||
local current = vim.api.nvim_get_current_buf()
|
local current = vim.api.nvim_get_current_buf()
|
||||||
for _, buffer in ipairs(vim.api.nvim_list_bufs()) do
|
for _, buffer in ipairs(vim.api.nvim_list_buffers()) do
|
||||||
if buffer ~= current and vim.bo[buffer].buflisted and not vim.bo[buffer].modified then
|
if buffer ~= current and vim.bo[buffer].buflisted and not vim.bo[buffer].modified then
|
||||||
vim.api.nvim_buf_delete(buffer, {})
|
vim.api.nvim_buf_delete(buffer, {})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
map("n", "<leader>bD", delete_other_buffers, { desc = "Close All Other Buffers" })
|
|
||||||
|
|
||||||
local function wipeout_other_buffers()
|
local function wipeout_other_buffers()
|
||||||
local current = vim.api.nvim_get_current_buf()
|
local current = vim.api.nvim_get_current_buf()
|
||||||
for _, buffer in ipairs(vim.api.nvim_list_bufs()) do
|
for _, buffer in ipairs(vim.api.nvim_list_buffers()) do
|
||||||
if buffer ~= current and vim.bo[buffer].buflisted and not vim.bo[buffer].modified then
|
if buffer ~= current and vim.bo[buffer].buflisted and not vim.bo[buffer].modified then
|
||||||
vim.cmd("bwipeout " .. buffer)
|
vim.cmd("bwipeout " .. buffer)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
map("n", "<leader>bd", smart_buffer_delete, { desc = "Close Current Buffer" })
|
||||||
|
map("n", "<leader>bw", smart_buffer_wipeout, { desc = "Wipeout Current Buffer" })
|
||||||
|
map("n", "<leader>bD", delete_other_buffers, { desc = "Close All Other Buffers" })
|
||||||
map("n", "<leader>bW", wipeout_other_buffers, { desc = "Wipeout All Other Buffers" })
|
map("n", "<leader>bW", wipeout_other_buffers, { desc = "Wipeout All Other Buffers" })
|
||||||
|
for i = 1, 10 do
|
||||||
|
map("n", "<Leader>b" .. (i%10), "<Cmd>LualineBuffersJump! " .. i .. "<Cr>", { desc = "Jump to Buffer " .. i })
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Trouble Keybinds
|
||||||
|
-- open diagnostics window
|
||||||
|
map("n", "<leader>xd", [[<Cmd>Trouble diagnostics toggle focus=false filter.buf=0<CR>]], { desc = "Toggle diagnostic message for current buffer" })
|
||||||
|
map("n", "<leader>xD", [[<Cmd>Trouble diagnostics toggle focus=false<CR>]], { desc = "Toggle diagnostic message for project" })
|
||||||
|
map("n", "grl", [[<Cmd>Trouble lsp toggle focus=false win.position=right win.relative=win pinned=true<CR>]], { desc = "Open LSP Info" })
|
||||||
|
map("n", "grt", [[<Cmd>Trouble symbols toggle focus=false<CR>]], { desc = "Open TreeSitter Symbols" })
|
||||||
|
map("n", "grs", [[<Cmd>Trouble lsp_document_symbols toggle focus=false<CR>]], { desc = "Open LSP Document Symbols", silent = true, noremap = true })
|
||||||
|
map("n", "grD", [[<Cmd>Trouble lsp_declarations toggle<CR>]], { desc = "Show LSP Declarations", silent = true, noremap = true })
|
||||||
|
map("n", "grd", [[<Cmd>Trouble lsp_definitions toggle<CR>]], { desc = "Show LSP Definitions", silent = true, noremap = true })
|
||||||
|
map("n", "gri", [[<Cmd>Trouble lsp_implementations toggle<CR>]], { desc = "Show LSP Implementations", silent = true, noremap = true })
|
||||||
|
map("n", "grc", [[<Cmd>Trouble lsp_incoming_calls toggle<CR>]], { desc = "Show LSP incoming calls", silent = true, noremap = true })
|
||||||
|
map("n", "grC", [[<Cmd>Trouble lsp_outgoing_calls toggle<CR>]], { desc = "Show LSP outgoing calls", silent = true, noremap = true })
|
||||||
|
map("n", "grr", [[<Cmd>Trouble lsp_references toggle<CR>]], { desc = "Show LSP references", silent = true, noremap = true })
|
||||||
|
map("n", "<leader>xq", [[<Cmd>Trouble qflist toggle focus=false<CR>]], { desc = "Show Quickfix List" })
|
||||||
|
map("n", "<leader>xl", [[<Cmd>Trouble loclist toggle focus=false<CR>]], { desc = "Show Location List" })
|
||||||
|
map("n", "grn", vim.lsp.buf.rename, { desc = "Rename", silent = true, noremap = true })
|
||||||
|
map({"n", "v"}, "gra", vim.lsp.buf.code_action, { desc = "Action", silent = true, noremap = true })
|
||||||
|
map("n", "gl", vim.diagnostic.open_float, { desc = "Open Diagnostic Float" })
|
||||||
|
map("n", "grx", vim.lsp.codelens.run, { desc = "Run Codelens Operation" })
|
||||||
|
|
||||||
|
-- Toggle Codelens
|
||||||
|
map("n", "<leader>tc", function()
|
||||||
|
vim.g.codelens_enabled = not vim.g.codelens_enabled
|
||||||
|
vim.lsp.codelens.enable(vim.g.codelens_enabled)
|
||||||
|
end, { desc = "Toggle Code Lens" })
|
||||||
|
|
||||||
|
-- Open Signature Help
|
||||||
|
map("i", "<C-s>", function()
|
||||||
|
vim.lsp.buf.signature_help()
|
||||||
|
end, { desc = "Show signature help" })
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
--[[
|
--[[
|
||||||
|
|
||||||
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
@@ -25,8 +26,8 @@
|
|||||||
| _/ /_____\__ \ || (_| | (__| <
|
| _/ /_____\__ \ || (_| | (__| <
|
||||||
|_|/___| |___/\__\__,_|\___|_|\_\
|
|_|/___| |___/\__\__,_|\___|_|\_\
|
||||||
|
|
||||||
Neovim 0.12 configuration
|
Neovim v0.12 configuration
|
||||||
(c) Frank Zechert 2026
|
(C) Frank Zechert 2026
|
||||||
]]
|
]]
|
||||||
|
|
||||||
-- Keep the current directory and the browsing directory synced.
|
-- Keep the current directory and the browsing directory synced.
|
||||||
|
|||||||
+58
-37
@@ -1,5 +1,6 @@
|
|||||||
--[[
|
--[[
|
||||||
|
|
||||||
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
@@ -25,65 +26,78 @@
|
|||||||
| _/ /_____\__ \ || (_| | (__| <
|
| _/ /_____\__ \ || (_| | (__| <
|
||||||
|_|/___| |___/\__\__,_|\___|_|\_\
|
|_|/___| |___/\__\__,_|\___|_|\_\
|
||||||
|
|
||||||
Neovim 0.12 configuration
|
Neovim v0.12 configuration
|
||||||
(c) Frank Zechert 2026
|
(C) Frank Zechert 2026
|
||||||
]]
|
]]
|
||||||
|
|
||||||
-- UI
|
-- UI settings
|
||||||
|
|
||||||
vim.opt.background = vim.g.ui.background
|
vim.opt.background = vim.g.ui.background
|
||||||
|
-- Colored columns and rows
|
||||||
vim.opt.colorcolumn = "+1,+2"
|
vim.opt.colorcolumn = "+1,+2"
|
||||||
|
vim.opt.textwidth = 120
|
||||||
vim.opt.cursorcolumn = true
|
vim.opt.cursorcolumn = true
|
||||||
vim.opt.cursorline = true
|
vim.opt.cursorline = true
|
||||||
vim.opt.cursorlineopt = "both"
|
vim.opt.cursorlineopt = "both" -- cursor line is displayed in line and in number
|
||||||
vim.opt.linebreak = true
|
vim.opt.signcolumn = "yes"
|
||||||
vim.opt.list = true
|
vim.opt.termguicolors = true
|
||||||
vim.opt.listchars = vim.g.ui.listchars
|
-- Linebreak behaviour and scroll offset
|
||||||
vim.opt.number = true
|
vim.opt.linebreak = true -- visually line break at word boundary
|
||||||
vim.opt.numberwidth = 4
|
vim.opt.showbreak = vim.g.ui.linebreak -- show line break indicator
|
||||||
vim.opt.relativenumber = false
|
|
||||||
vim.opt.winborder = vim.g.ui.border
|
|
||||||
vim.opt.pumborder = vim.g.ui.border
|
|
||||||
vim.opt.scrolloff = 5
|
vim.opt.scrolloff = 5
|
||||||
vim.opt.sidescrolloff = 3
|
vim.opt.sidescrolloff = 3
|
||||||
vim.opt.showbreak = vim.g.ui.linebreak
|
vim.opt.wrap = false -- by default, do not wrap long lines
|
||||||
vim.opt.signcolumn = "yes"
|
vim.opt.wrapmargin = 3
|
||||||
|
-- Show special characters
|
||||||
|
vim.opt.list = true
|
||||||
|
vim.opt.listchars = vim.g.ui.listchars
|
||||||
|
-- show line numbers
|
||||||
|
vim.opt.number = true
|
||||||
|
vim.opt.relativenumber = true
|
||||||
|
vim.opt.numberwidth = 4
|
||||||
|
-- border settings
|
||||||
|
vim.opt.winborder = vim.g.ui.windowborder
|
||||||
|
vim.opt.pumborder = vim.g.ui.popupborder
|
||||||
|
-- window split behaviour
|
||||||
vim.opt.splitbelow = true
|
vim.opt.splitbelow = true
|
||||||
vim.opt.splitright = true
|
vim.opt.splitright = true
|
||||||
vim.opt.termguicolors = true
|
-- hide mode, displayed in lualine
|
||||||
vim.opt.textwidth = 120
|
|
||||||
vim.opt.wrap = false
|
|
||||||
-- when no textwidth is specified, automatically add <EOL> at the end of a long line 3
|
|
||||||
-- characters before reaching the window edge. Will have no effect if textwidth is specified otherwise.
|
|
||||||
-- Set to 0 to disable.
|
|
||||||
vim.opt.wrapmargin = 3
|
|
||||||
-- hide mode and serch count (displayed in lualine instead)
|
|
||||||
vim.opt.showmode = false
|
vim.opt.showmode = false
|
||||||
vim.opt.shortmess:append("S")
|
vim.opt.shortmess:append("S")
|
||||||
|
-- enable visual bell
|
||||||
vim.opt.visualbell = true
|
vim.opt.visualbell = true
|
||||||
|
|
||||||
-- Editing
|
|
||||||
|
-- Editing settings
|
||||||
|
|
||||||
vim.opt.autoindent = true
|
vim.opt.autoindent = true
|
||||||
vim.opt.backspace = { "indent", "eol", "start" }
|
vim.opt.backspace = { "indent", "eol", "start" }
|
||||||
vim.opt.expandtab = false
|
|
||||||
vim.opt.preserveindent = true
|
vim.opt.preserveindent = true
|
||||||
|
vim.opt.smartindent = true
|
||||||
|
vim.opt.breakindent = true
|
||||||
|
vim.opt.breakindentopt:append({ min = 20, shift = -2, sbr = true, list = -1 })
|
||||||
|
-- tab settings
|
||||||
|
vim.opt.expandtab = false
|
||||||
vim.opt.shiftround = true
|
vim.opt.shiftround = true
|
||||||
vim.opt.shiftwidth = 0
|
vim.opt.shiftwidth = 0
|
||||||
vim.opt.tabstop = 4
|
vim.opt.tabstop = 4
|
||||||
vim.opt.softtabstop = -1
|
vim.opt.softtabstop = -1
|
||||||
vim.opt.smarttab = true
|
vim.opt.smarttab = true
|
||||||
vim.opt.smartindent = true
|
-- matching pairs of symbols
|
||||||
vim.opt.breakindent = true
|
|
||||||
vim.opt.breakindentopt:append({ min = 20, shift = -2, sbr = true, list = -1 })
|
|
||||||
vim.opt.matchpairs:append({ "<:>" })
|
vim.opt.matchpairs:append({ "<:>" })
|
||||||
|
|
||||||
-- Search
|
|
||||||
|
-- Search settings
|
||||||
|
|
||||||
vim.opt.hlsearch = true
|
vim.opt.hlsearch = true
|
||||||
vim.opt.ignorecase = true
|
vim.opt.ignorecase = true
|
||||||
vim.opt.inccommand = "split"
|
vim.opt.inccommand = "split"
|
||||||
vim.opt.incsearch = true
|
vim.opt.incsearch = true
|
||||||
vim.opt.smartcase = true
|
vim.opt.smartcase = true
|
||||||
|
|
||||||
-- Files
|
|
||||||
|
-- Files settings
|
||||||
|
|
||||||
vim.opt.backup = false
|
vim.opt.backup = false
|
||||||
vim.opt.writebackup = false
|
vim.opt.writebackup = false
|
||||||
vim.opt.fileformat = "unix"
|
vim.opt.fileformat = "unix"
|
||||||
@@ -91,25 +105,32 @@ vim.opt.fileencoding = "utf-8"
|
|||||||
vim.opt.undofile = true
|
vim.opt.undofile = true
|
||||||
vim.opt.swapfile = true
|
vim.opt.swapfile = true
|
||||||
|
|
||||||
-- Performance
|
|
||||||
vim.opt.updatetime = 1000
|
|
||||||
vim.opt.timeoutlen = 600
|
|
||||||
|
|
||||||
-- Mouse & Clipboard
|
-- Performance settings
|
||||||
|
|
||||||
|
vim.opt.updatetime = 1000 -- after this idle time, write backup, swap files etc.
|
||||||
|
vim.opt.timeoutlen = 500 -- timeout to wait for key combinations to complete.
|
||||||
|
|
||||||
|
|
||||||
|
-- Mouse and Clipboard settings
|
||||||
|
|
||||||
vim.opt.mouse = "a"
|
vim.opt.mouse = "a"
|
||||||
vim.schedule(function() vim.opt.clipboard = "unnamedplus" end)
|
vim.schedule(function() vim.opt.clipboard = "unnamedplus" end)
|
||||||
|
|
||||||
-- Folding
|
|
||||||
|
-- Folding settings
|
||||||
|
|
||||||
vim.opt.foldcolumn = "auto"
|
vim.opt.foldcolumn = "auto"
|
||||||
vim.opt.foldmethod = "expr"
|
vim.opt.foldmethod = "expr"
|
||||||
vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
||||||
vim.opt.foldlevel = 99
|
vim.opt.foldlevel = 10 -- keep this many levels of folds open by default
|
||||||
|
|
||||||
|
|
||||||
|
-- Autocomplete settings
|
||||||
|
|
||||||
-- Autocompletion
|
|
||||||
vim.opt.autocomplete = false
|
vim.opt.autocomplete = false
|
||||||
vim.opt.autocompletedelay = 0
|
vim.opt.autocompletedelay = 0
|
||||||
vim.opt.autocompletetimeout = 0
|
vim.opt.autocompletetimeout = 0
|
||||||
vim.opt.completeopt = { "menu", "menuone", "noinsert", "popup", "preview" }
|
vim.opt.completeopt = { "menu", "menuone", "noinsert", "popup", "preview" }
|
||||||
vim.opt.completeitemalign = { "abbr", "kind", "menu" }
|
vim.opt.completeitemalign = { "abbr", "kind", "menu" }
|
||||||
vim.opt.completetimeout = 0
|
vim.opt.completetimeout = 0
|
||||||
|
|
||||||
|
|||||||
+13
-55
@@ -1,5 +1,6 @@
|
|||||||
--[[
|
--[[
|
||||||
|
|
||||||
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
@@ -25,16 +26,13 @@
|
|||||||
| _/ /_____\__ \ || (_| | (__| <
|
| _/ /_____\__ \ || (_| | (__| <
|
||||||
|_|/___| |___/\__\__,_|\___|_|\_\
|
|_|/___| |___/\__\__,_|\___|_|\_\
|
||||||
|
|
||||||
Neovim 0.12 configuration
|
Neovim v0.12 configuration
|
||||||
(c) Frank Zechert 2026
|
(C) Frank Zechert 2026
|
||||||
]]
|
]]
|
||||||
|
|
||||||
-- General UI settings applied across different parts of the neovim configuration
|
|
||||||
vim.g.ui = {
|
vim.g.ui = {
|
||||||
backround = "dark",
|
background = "dark",
|
||||||
flavour = "macchiato",
|
flavour = "macchiato",
|
||||||
border = "single",
|
|
||||||
linebreak = "↘",
|
|
||||||
listchars = {
|
listchars = {
|
||||||
eol = "↵",
|
eol = "↵",
|
||||||
tab = "⇥ ",
|
tab = "⇥ ",
|
||||||
@@ -49,21 +47,18 @@ vim.g.ui = {
|
|||||||
conceal = "⋯",
|
conceal = "⋯",
|
||||||
nbsp = "␣",
|
nbsp = "␣",
|
||||||
},
|
},
|
||||||
textwidth = {
|
linebreak = "↘",
|
||||||
default = 120
|
windowborder = "single",
|
||||||
},
|
popupborder = "single",
|
||||||
custom_highlights = function(colors, utils)
|
custom_highlights = function(colors, _)
|
||||||
return {
|
return {
|
||||||
whitespace = { fg = colors.overlay0 },
|
whitespace = { fg = colors.overlay0 },
|
||||||
TrailingWhitespace = { fg = colors.red },
|
TrailingWhitespace = { fg = colors.red },
|
||||||
LineNr = { fg = colors.overlay0 },
|
LineNr = { fg = colors.overlay0 },
|
||||||
CursorLineNR = { fg = colors.peach },
|
CursorLineNr = { fg = colors.peach },
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
symbols = {
|
symbols = {
|
||||||
component_separators = { left = "│", right = "│" },
|
|
||||||
section_separators = { left = "▒", right = "▒" },
|
|
||||||
window = "",
|
|
||||||
diagnostic = {
|
diagnostic = {
|
||||||
prefix = "■",
|
prefix = "■",
|
||||||
sign_error = "E",
|
sign_error = "E",
|
||||||
@@ -71,46 +66,9 @@ vim.g.ui = {
|
|||||||
sign_info = "I",
|
sign_info = "I",
|
||||||
sign_hint = "H",
|
sign_hint = "H",
|
||||||
},
|
},
|
||||||
git = {
|
component_separators = { left = "│", right = "│" },
|
||||||
signs = {
|
section_separators = { left = "▒", right = "▒" },
|
||||||
add = { text = "┃" },
|
window = "",
|
||||||
change = { text = "┃" },
|
not_overline = "\u{0305}",
|
||||||
delete = { text = "_" },
|
|
||||||
topdelete = { text = "‾" },
|
|
||||||
changedelete = { text = "~" },
|
|
||||||
untracked = { text = "┆" },
|
|
||||||
},
|
|
||||||
signs_staged = {
|
|
||||||
add = { text = "┃" },
|
|
||||||
change = { text = "┃" },
|
|
||||||
delete = { text = "_" },
|
|
||||||
topdelete = { text = "‾" },
|
|
||||||
changedelete = { text = "~" },
|
|
||||||
untracked = { text = "┆" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
todo_comments = {
|
|
||||||
error = {
|
|
||||||
icon = "",
|
|
||||||
},
|
|
||||||
todo = {
|
|
||||||
icon = "",
|
|
||||||
},
|
|
||||||
hack = {
|
|
||||||
icon = "",
|
|
||||||
},
|
|
||||||
warn = {
|
|
||||||
icon = "",
|
|
||||||
},
|
|
||||||
perf = {
|
|
||||||
icon = "",
|
|
||||||
},
|
|
||||||
note = {
|
|
||||||
icon = "",
|
|
||||||
},
|
|
||||||
test = {
|
|
||||||
icon = "",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,208 @@
|
|||||||
|
--[[
|
||||||
|
|
||||||
|
|
||||||
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
||||||
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠚⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠗⢀
|
||||||
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣄⡉⠓⠦⣌⡙⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⢋⣡⠴⠚⢉⣠⣤⣀
|
||||||
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣶⣿⣿⣿⣿⣿⣷⣦⣄⡉⠓⠦⣌⡙⠻⢿⣿⣿⣿⣿⣿⣿⡿⠟⢋⣡⠴⠚⢉⣠⣴⣾⣿⣿⣿⣿⣿⣶⣤
|
||||||
|
⠀⠀⠀⠀⠀⠀⠀⠀⠐⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠓⠦⣌⡙⠻⠟⢋⣡⠴⠚⢉⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⠂
|
||||||
|
⠀⠀⠀⠀⢀⣠⣴⣆⡈⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠃⠘⢉⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢁⣰⣦⣄⡀
|
||||||
|
⠀⠀⠐⠾⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠷⠂
|
||||||
|
⠀⢸⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⡇
|
||||||
|
⠀⢸⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⡇
|
||||||
|
⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⡆⢰⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
|
||||||
|
⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠃⠘⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
|
||||||
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
|
||||||
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
|
||||||
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
|
||||||
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⡇⢸⣿⣿⣿⣿⠿⠛⠉
|
||||||
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⡇⢸⠿⠛⠉
|
||||||
|
|
||||||
|
__ _ _
|
||||||
|
/ _|___ ___| |_ __ _ ___| | __
|
||||||
|
| ||_ /____/ __| __/ _` |/ __| |/ /
|
||||||
|
| _/ /_____\__ \ || (_| | (__| <
|
||||||
|
|_|/___| |___/\__\__,_|\___|_|\_\
|
||||||
|
|
||||||
|
Neovim v0.12 configuration
|
||||||
|
(C) Frank Zechert 2026
|
||||||
|
]]
|
||||||
|
vim.pack.add({
|
||||||
|
{ src = "https://github.com/neovim/nvim-lspconfig" },
|
||||||
|
})
|
||||||
|
|
||||||
|
require("lsp.lua_ls")
|
||||||
|
|
||||||
|
local function run_healthcheck(section)
|
||||||
|
local before = {}
|
||||||
|
for _, b in ipairs(vim.api.nvim_list_bufs()) do
|
||||||
|
before[b] = true
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.cmd("silent checkhealth " .. section)
|
||||||
|
|
||||||
|
local after = vim.api.nvim_list_bufs()
|
||||||
|
local health_buf = nil
|
||||||
|
|
||||||
|
for _, b in ipairs(after) do
|
||||||
|
if not before[b] then
|
||||||
|
health_buf = b
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if not health_buf then
|
||||||
|
return { "Could not capture :checkhealth " .. section .. " output" }
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Read lines
|
||||||
|
local lines = vim.api.nvim_buf_get_lines(health_buf, 0, -1, false)
|
||||||
|
|
||||||
|
-- Close the health window
|
||||||
|
for _, win in ipairs(vim.api.nvim_list_wins()) do
|
||||||
|
if vim.api.nvim_win_get_buf(win) == health_buf then
|
||||||
|
vim.api.nvim_win_close(win, true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Close the buffer
|
||||||
|
vim.api.nvim_buf_delete(health_buf, { force = true })
|
||||||
|
|
||||||
|
return lines
|
||||||
|
end
|
||||||
|
|
||||||
|
local function get_all_treesitter_languages()
|
||||||
|
local bufnr = 0
|
||||||
|
local ok, parser = pcall(vim.treesitter.get_parser, bufnr)
|
||||||
|
if not ok or not parser then
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
|
||||||
|
local langs = { parser:lang() }
|
||||||
|
for _, child in ipairs(parser:children()) do
|
||||||
|
table.insert(langs, child:lang())
|
||||||
|
end
|
||||||
|
return langs
|
||||||
|
end
|
||||||
|
|
||||||
|
local function get_treesitter_status()
|
||||||
|
local bufnr = 0
|
||||||
|
local ok, parser = pcall(vim.treesitter.get_parser, bufnr)
|
||||||
|
|
||||||
|
if not ok or not parser then
|
||||||
|
return {
|
||||||
|
"Treesitter:",
|
||||||
|
" active: no",
|
||||||
|
" parsers: none",
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
local langs = get_all_treesitter_languages()
|
||||||
|
return {
|
||||||
|
"Treesitter:",
|
||||||
|
" active: yes",
|
||||||
|
" parsers: " .. table.concat(langs, ", "),
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function show_lsp_details()
|
||||||
|
local popup_buffer = vim.api.nvim_create_buf(false, true)
|
||||||
|
local lsp_clients = vim.lsp.get_clients({ bufnr = 0 })
|
||||||
|
local lines = {}
|
||||||
|
|
||||||
|
-- Treesitter status
|
||||||
|
table.insert(lines, "Treesitter Status")
|
||||||
|
table.insert(lines, "=================")
|
||||||
|
local ts = get_treesitter_status()
|
||||||
|
for _, l in ipairs(ts) do
|
||||||
|
table.insert(lines, l)
|
||||||
|
end
|
||||||
|
|
||||||
|
table.insert(lines, "")
|
||||||
|
if #lsp_clients == 0 then
|
||||||
|
table.insert(lines, "No LSP clients attached.")
|
||||||
|
else
|
||||||
|
table.insert(lines, "Active LSP Clients:")
|
||||||
|
table.insert(lines, "===================")
|
||||||
|
for _, client in ipairs(lsp_clients) do
|
||||||
|
table.insert(lines, "")
|
||||||
|
table.insert(lines, "• " .. client.name)
|
||||||
|
|
||||||
|
-- Root folders
|
||||||
|
local roots = {}
|
||||||
|
if client.workspace_folders then
|
||||||
|
for _, workspace_folder in ipairs(client.workspace_folders) do
|
||||||
|
table.insert(roots, workspace_folder.name or workspace_folder.uri or "")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if #roots > 0 then
|
||||||
|
table.insert(lines, " Roots:")
|
||||||
|
for _, root in ipairs(roots) do
|
||||||
|
table.insert(lines, " - " ..root)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
table.insert(lines, " Roots: none")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Capabilities
|
||||||
|
table.insert(lines, " Capabilities:")
|
||||||
|
for capability, _ in pairs(client.server_capabilities or {}) do
|
||||||
|
table.insert(lines, " - " .. capability)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
table.insert(lines, "")
|
||||||
|
table.insert(lines, "Health Check (vim.lsp):")
|
||||||
|
table.insert(lines, "=======================")
|
||||||
|
local health_lines = run_healthcheck("vim.lsp")
|
||||||
|
for _, l in ipairs(health_lines) do
|
||||||
|
table.insert(lines, " " .. l)
|
||||||
|
end
|
||||||
|
|
||||||
|
table.insert(lines, "")
|
||||||
|
table.insert(lines, "Health Check (vim.treesitter):")
|
||||||
|
table.insert(lines, "=======================")
|
||||||
|
health_lines = run_healthcheck("vim.treesitter")
|
||||||
|
for _, l in ipairs(health_lines) do
|
||||||
|
table.insert(lines, " " .. l)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
vim.api.nvim_buf_set_lines(popup_buffer, 0, -1, false, lines)
|
||||||
|
vim.api.nvim_set_option_value("modifiable", false, { buf = popup_buffer })
|
||||||
|
vim.api.nvim_set_option_value("readonly", true, { buf = popup_buffer })
|
||||||
|
local width = math.floor(vim.o.columns * 0.6)
|
||||||
|
local height = math.floor(vim.o.lines * 0.6)
|
||||||
|
local row = math.floor((vim.o.lines - height) / 2)
|
||||||
|
local col = math.floor((vim.o.columns - width) / 2)
|
||||||
|
|
||||||
|
local window = vim.api.nvim_open_win(popup_buffer, true, {
|
||||||
|
relative = "editor",
|
||||||
|
style = "minimal",
|
||||||
|
border = vim.g.ui.popupborder,
|
||||||
|
row = row,
|
||||||
|
col = col,
|
||||||
|
width = width,
|
||||||
|
height = height,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.keymap.set("n", "q", function()
|
||||||
|
if vim.api.nvim_win_is_valid(window) then
|
||||||
|
vim.api.nvim_win_close(window, true)
|
||||||
|
end
|
||||||
|
end, { buffer = popup_buffer, nowait = true, desc = "Close Window" })
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>xi", show_lsp_details, {
|
||||||
|
desc = "Show detailed LSP info in a float"
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.g.codelens_enabled = true
|
||||||
|
vim.lsp.codelens.enable(vim.g.codelens_enable)
|
||||||
|
|
||||||
|
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
--[[
|
--[[
|
||||||
|
|
||||||
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
@@ -25,44 +26,50 @@
|
|||||||
| _/ /_____\__ \ || (_| | (__| <
|
| _/ /_____\__ \ || (_| | (__| <
|
||||||
|_|/___| |___/\__\__,_|\___|_|\_\
|
|_|/___| |___/\__\__,_|\___|_|\_\
|
||||||
|
|
||||||
Neovim 0.12 configuration
|
Neovim v0.12 configuration
|
||||||
(c) Frank Zechert 2026
|
(C) Frank Zechert 2026
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
vim.lsp.config("lua_ls", {
|
||||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
on_init = function(client)
|
||||||
local lazyrepository = "https://github.com/folke/lazy.nvim.git"
|
if client.workspace_folders then
|
||||||
local output = vim.fn.system({
|
local path = client.workspace_folders[1].name
|
||||||
"git",
|
if
|
||||||
"clone",
|
path ~= vim.fn.stdpath("config")
|
||||||
"--filter=blob:none",
|
and (
|
||||||
"--branch=stable",
|
vim.uv.fs_stat(path .. "/.luarc.json")
|
||||||
lazyrepository,
|
or vim.uv.fs_stat(path .. "/.luarc.jsonc")
|
||||||
lazypath
|
)
|
||||||
})
|
then
|
||||||
|
-- Path is not neovim's config folder, or has custom
|
||||||
if vim.v.shell_error ~= 0 then
|
-- lua language server configuration, skip custom client configuration
|
||||||
vim.api.nvim_echo({
|
return
|
||||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
|
||||||
{ out, "WarningMsg" },
|
|
||||||
{ "\nPress any key to continue" },
|
|
||||||
}, true, {})
|
|
||||||
vim.fn.getchar()
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
client.config.settings.Lua = vim.tbl_deep_extend("force", client.config.settings.Lua, {
|
||||||
vim.opt.rtp:prepend(lazypath)
|
runtime = {
|
||||||
|
-- neovim uses LuaJIT runtime
|
||||||
require("lazy").setup({
|
version = "LuaJIT",
|
||||||
spec = {
|
-- find lua modules the same way neovim does
|
||||||
{ import = "plugins" }
|
path = {
|
||||||
},
|
"lua/?.lua",
|
||||||
install = { missing = true, colorscheme = { "catppucchin" } },
|
"lua/?/init.lua",
|
||||||
ui = {
|
}
|
||||||
border = vim.g.ui.border
|
|
||||||
},
|
|
||||||
checker = {
|
|
||||||
enabled = false,
|
|
||||||
notify = true,
|
|
||||||
},
|
},
|
||||||
|
-- make the server aware of neovim runtime files
|
||||||
|
workspace = {
|
||||||
|
checkThirdParty = false,
|
||||||
|
library = {
|
||||||
|
vim.env.VIMRUNTIME,
|
||||||
|
-- for LSP settings type annotations
|
||||||
|
vim.api.nvim_get_runtime_file("lua/lspconfig", false)[1],
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
end,
|
||||||
|
settings = {
|
||||||
|
Lua = {}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.lsp.enable({ "lua_ls" })
|
||||||
+10
-16
@@ -1,5 +1,6 @@
|
|||||||
--[[
|
--[[
|
||||||
|
|
||||||
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
@@ -25,18 +26,15 @@
|
|||||||
| _/ /_____\__ \ || (_| | (__| <
|
| _/ /_____\__ \ || (_| | (__| <
|
||||||
|_|/___| |___/\__\__,_|\___|_|\_\
|
|_|/___| |___/\__\__,_|\___|_|\_\
|
||||||
|
|
||||||
Neovim 0.12 configuration
|
Neovim v0.12 configuration
|
||||||
(c) Frank Zechert 2026
|
(C) Frank Zechert 2026
|
||||||
]]
|
]]
|
||||||
|
|
||||||
return {
|
vim.pack.add({
|
||||||
{
|
{ src = "https://github.com/catppuccin/nvim", name ="catppuccin" }
|
||||||
"catppuccin/nvim",
|
})
|
||||||
name = "catppuccin",
|
|
||||||
main = "catppuccin",
|
require("catppuccin").setup({
|
||||||
priority = 1000,
|
|
||||||
lazy = false,
|
|
||||||
opts = {
|
|
||||||
flavour = vim.g.ui.flavour,
|
flavour = vim.g.ui.flavour,
|
||||||
transparent_background = false,
|
transparent_background = false,
|
||||||
float = {
|
float = {
|
||||||
@@ -58,10 +56,6 @@ return {
|
|||||||
enable = true,
|
enable = true,
|
||||||
-- additional_vim_regex_highlighting = false,
|
-- additional_vim_regex_highlighting = false,
|
||||||
},
|
},
|
||||||
},
|
})
|
||||||
config = function(_, opts)
|
|
||||||
require("catppuccin").setup(opts)
|
|
||||||
vim.cmd.colorscheme("catppuccin")
|
vim.cmd.colorscheme("catppuccin")
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,107 +0,0 @@
|
|||||||
--[[
|
|
||||||
|
|
||||||
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠚⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠗⢀
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣄⡉⠓⠦⣌⡙⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⢋⣡⠴⠚⢉⣠⣤⣀
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣶⣿⣿⣿⣿⣿⣷⣦⣄⡉⠓⠦⣌⡙⠻⢿⣿⣿⣿⣿⣿⣿⡿⠟⢋⣡⠴⠚⢉⣠⣴⣾⣿⣿⣿⣿⣿⣶⣤
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠐⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠓⠦⣌⡙⠻⠟⢋⣡⠴⠚⢉⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⠂
|
|
||||||
⠀⠀⠀⠀⢀⣠⣴⣆⡈⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠃⠘⢉⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢁⣰⣦⣄⡀
|
|
||||||
⠀⠀⠐⠾⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠷⠂
|
|
||||||
⠀⢸⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⡇
|
|
||||||
⠀⢸⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⡇
|
|
||||||
⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⡆⢰⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
|
|
||||||
⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠃⠘⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⡇⢸⣿⣿⣿⣿⠿⠛⠉
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⡇⢸⠿⠛⠉
|
|
||||||
|
|
||||||
__ _ _
|
|
||||||
/ _|___ ___| |_ __ _ ___| | __
|
|
||||||
| ||_ /____/ __| __/ _` |/ __| |/ /
|
|
||||||
| _/ /_____\__ \ || (_| | (__| <
|
|
||||||
|_|/___| |___/\__\__,_|\___|_|\_\
|
|
||||||
|
|
||||||
Neovim 0.12 configuration
|
|
||||||
(c) Frank Zechert 2026
|
|
||||||
]]
|
|
||||||
|
|
||||||
return {
|
|
||||||
{
|
|
||||||
"lewis6991/gitsigns.nvim",
|
|
||||||
opts = {
|
|
||||||
signs = vim.g.ui.symbols.git.signs,
|
|
||||||
signs_staged = vim.g.ui.symbols.git.signs_staged,
|
|
||||||
signs_staged_enable = true,
|
|
||||||
signcolumn = true,
|
|
||||||
numhl = false,
|
|
||||||
linehl = false,
|
|
||||||
word_diff = false,
|
|
||||||
attach_to_untracked = true,
|
|
||||||
current_line_blame = false,
|
|
||||||
current_line_blame_opts = {
|
|
||||||
virt_text = true,
|
|
||||||
virt_text_pos = 'eol',
|
|
||||||
delay = 1000,
|
|
||||||
ignore_whitespace = false,
|
|
||||||
virt_text_priority = 100,
|
|
||||||
use_focus = true,
|
|
||||||
},
|
|
||||||
current_line_blame_formatter = '<author>, <author_time:%R> - <summary>',
|
|
||||||
blame_formatter = nil,
|
|
||||||
sign_priority = 6,
|
|
||||||
on_attach = function(bufnr)
|
|
||||||
local gitsigns = require("gitsigns")
|
|
||||||
|
|
||||||
vim.keymap.set("n", "]c", function()
|
|
||||||
if vim.wo.diff then
|
|
||||||
vim.cmd.normal({ "]c", bang = true })
|
|
||||||
else
|
|
||||||
gitsigns.nav_hunk("next")
|
|
||||||
end
|
|
||||||
end, { buffer = bufnr, desc = "Jump to Next Hunk" })
|
|
||||||
vim.keymap.set("n", "[c", function()
|
|
||||||
if vim.wo.diff then
|
|
||||||
vim.cmd.normal({ "[c", bang = true })
|
|
||||||
else
|
|
||||||
gitsigns.nav_hunk("prev")
|
|
||||||
end
|
|
||||||
end, { buffer = bufnr, desc = "Jump to Previous Hunk" })
|
|
||||||
vim.keymap.set("n", "<leader>hs", gitsigns.stage_hunk, { buffer = bufnr, desc = "Stage Hunk" })
|
|
||||||
vim.keymap.set("n", "<leader>hr", gitsigns.reset_hunk, { buffer = bufnr, desc = "Reset Hunk" })
|
|
||||||
vim.keymap.set("v", "<leader>hs", function()
|
|
||||||
gitsigns.stage_hunk({vim .fn.line("."), vim.fn.line("v")})
|
|
||||||
end, { buffer = bufnr, desc = "Stage Hunk" })
|
|
||||||
vim.keymap.set("v", "<leader>hr", function()
|
|
||||||
gitsigns.stage_reset({vim .fn.line("."), vim.fn.line("v")})
|
|
||||||
end, { buffer = bufnr, desc = "Reset Hunk" })
|
|
||||||
vim.keymap.set("n", "<leader>hS", gitsigns.stage_buffer, { buffer = bufnr, desc = "Stage Buffer" })
|
|
||||||
vim.keymap.set("n", "<leader>hR", gitsigns.stage_buffer, { buffer = bufnr, desc = "Reset Buffer" })
|
|
||||||
vim.keymap.set("n", "<leader>hp", gitsigns.preview_hunk, { buffer = bufnr, desc = "Preview Hunk" })
|
|
||||||
vim.keymap.set("n", "<leader>hi", gitsigns.preview_hunk_inline, { buffer = bufnr, desc = "Preview Hunk Inline" })
|
|
||||||
vim.keymap.set("n", "<leader>hb", function()
|
|
||||||
gitsigns.blame_line({ full = true })
|
|
||||||
end, { buffer = bufnr, desc = "Blame Line" })
|
|
||||||
vim.keymap.set("n", "<leader>tb", gitsigns.toggle_current_line_blame, { buffer = bufnr, desc = "Toggle Blame Line" })
|
|
||||||
vim.keymap.set("n", "<leader>hB", function()
|
|
||||||
require("gitsigns").blame()
|
|
||||||
end, { buffer = bufnr, desc = "Blame Split Window" })
|
|
||||||
vim.keymap.set("n", "<leader>hd", gitsigns.diffthis, { buffer = bufnr, desc = "Diff This Against INDEX" })
|
|
||||||
vim.keymap.set("n", "<leader>hD", function()
|
|
||||||
gitsigns.diffthis("~")
|
|
||||||
end, { buffer = bufnr, desc = "Diff This Against HEAD" })
|
|
||||||
vim.keymap.set("n", "<leader>hq", gitsigns.setqflist, { buffer = bufnr, desc = "Buffer Git Hunks QFList" })
|
|
||||||
vim.keymap.set("n", "<leader>hQ", function()
|
|
||||||
gitsigns.setqflist("all")
|
|
||||||
end, { buffer = bufnr, desc = "Project Git Hunks QFList" })
|
|
||||||
vim.keymap.set("n", "<leader>tw", gitsigns.toggle_word_diff, { buffer = bufnr, desc = "Toggle Word Diff" })
|
|
||||||
vim.keymap.set({"o", "x"}, "ih", gitsigns.select_hunk, { desc = "Select Hunk" })
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
--[[
|
--[[
|
||||||
|
|
||||||
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
@@ -25,27 +26,12 @@
|
|||||||
| _/ /_____\__ \ || (_| | (__| <
|
| _/ /_____\__ \ || (_| | (__| <
|
||||||
|_|/___| |___/\__\__,_|\___|_|\_\
|
|_|/___| |___/\__\__,_|\___|_|\_\
|
||||||
|
|
||||||
Neovim 0.12 configuration
|
Neovim v0.12 configuration
|
||||||
(c) Frank Zechert 2026
|
(C) Frank Zechert 2026
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local enabled_ft = {
|
require("plugins/catppuccin")
|
||||||
"bash",
|
require("plugins/lualine")
|
||||||
}
|
require("plugins/trouble")
|
||||||
|
|
||||||
local parser_ft_map = {
|
require("plugins/whichkey")
|
||||||
-- parser = { list of filetypes }
|
|
||||||
bash = { "bash", "template" },
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Force enable syntax if it is not working automatically
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
|
||||||
pattern = enabled_ft,
|
|
||||||
callback = function()
|
|
||||||
vim.treesitter.start()
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
for parser, ft in pairs(parser_ft_map) do
|
|
||||||
vim.treesitter.language.register(parser, ft)
|
|
||||||
end
|
|
||||||
+36
-37
@@ -1,5 +1,6 @@
|
|||||||
--[[
|
--[[
|
||||||
|
|
||||||
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
@@ -25,10 +26,15 @@
|
|||||||
| _/ /_____\__ \ || (_| | (__| <
|
| _/ /_____\__ \ || (_| | (__| <
|
||||||
|_|/___| |___/\__\__,_|\___|_|\_\
|
|_|/___| |___/\__\__,_|\___|_|\_\
|
||||||
|
|
||||||
Neovim 0.12 configuration
|
Neovim v0.12 configuration
|
||||||
(c) Frank Zechert 2026
|
(C) Frank Zechert 2026
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
vim.pack.add({
|
||||||
|
{ src = "https://github.com/nvim-tree/nvim-web-devicons" },
|
||||||
|
{ src = "https://github.com/nvim-lualine/lualine.nvim" }
|
||||||
|
})
|
||||||
|
|
||||||
local function expandtabs()
|
local function expandtabs()
|
||||||
if not vim.bo.expandtab then
|
if not vim.bo.expandtab then
|
||||||
return string.format("%s %d", vim.g.ui.listchars.leadtab, vim.bo.tabstop)
|
return string.format("%s %d", vim.g.ui.listchars.leadtab, vim.bo.tabstop)
|
||||||
@@ -48,20 +54,36 @@ end
|
|||||||
local function treesitter_status()
|
local function treesitter_status()
|
||||||
local ok, parser = pcall(vim.treesitter.get_parser, 0)
|
local ok, parser = pcall(vim.treesitter.get_parser, 0)
|
||||||
if not ok or not parser then
|
if not ok or not parser then
|
||||||
return "T̅"
|
return "T"..vim.g.ui.symbols.not_overline
|
||||||
else
|
else
|
||||||
return "T"
|
return "T"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
local function lsp_status()
|
||||||
{
|
local clients = vim.lsp.get_clients({bufnr = 0})
|
||||||
"nvim-lualine/lualine.nvim",
|
if #clients == 0 then
|
||||||
dependencies = {
|
-- no LSP is attached
|
||||||
{ "nvim-tree/nvim-web-devicons" },
|
return "L"..vim.g.ui.symbols.not_overline
|
||||||
},
|
end
|
||||||
lazy = false,
|
|
||||||
opts = {
|
local lsp_names = {}
|
||||||
|
for _, client in ipairs(clients) do
|
||||||
|
local roots = {}
|
||||||
|
if client.workspace_folders then
|
||||||
|
for _, workspace_folder in ipairs(client.workspace_folders) do
|
||||||
|
table.insert(roots, workspace_folder.name or workspace_folder.uri or "")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local has_root = (roots and #roots > 0)
|
||||||
|
local root_flag = has_root and "+R" or ""
|
||||||
|
table.insert(lsp_names, string.format("%s%s", client.name, root_flag))
|
||||||
|
end
|
||||||
|
return string.format("L: %s", table.concat(lsp_names, ", "))
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
require('lualine').setup({
|
||||||
options = {
|
options = {
|
||||||
component_separators = vim.g.ui.symbols.component_separators,
|
component_separators = vim.g.ui.symbols.component_separators,
|
||||||
section_separators = vim.g.ui.symbols.section_separators,
|
section_separators = vim.g.ui.symbols.section_separators,
|
||||||
@@ -116,7 +138,7 @@ return {
|
|||||||
lualine_a = { windownumber },
|
lualine_a = { windownumber },
|
||||||
lualine_b = { "filename", "filetype" },
|
lualine_b = { "filename", "filetype" },
|
||||||
lualine_c = { "diagnostics" },
|
lualine_c = { "diagnostics" },
|
||||||
lualine_x = { treesitter_status },
|
lualine_x = { treesitter_status, lsp_status },
|
||||||
lualine_y = { "branch", "diff" },
|
lualine_y = { "branch", "diff" },
|
||||||
lualine_z = {},
|
lualine_z = {},
|
||||||
},
|
},
|
||||||
@@ -128,28 +150,5 @@ return {
|
|||||||
lualine_y = {},
|
lualine_y = {},
|
||||||
lualine_z = {},
|
lualine_z = {},
|
||||||
}
|
}
|
||||||
},
|
|
||||||
keys = {
|
})
|
||||||
{ "<leader>b1", "<Cmd>:LualineBuffersJump! 1<CR>", desc = "Show Buffer 1" },
|
|
||||||
{ "<leader>b2", "<Cmd>:LualineBuffersJump! 2<CR>", desc = "Show Buffer 2" },
|
|
||||||
{ "<leader>b3", "<Cmd>:LualineBuffersJump! 3<CR>", desc = "Show Buffer 3" },
|
|
||||||
{ "<leader>b4", "<Cmd>:LualineBuffersJump! 4<CR>", desc = "Show Buffer 4" },
|
|
||||||
{ "<leader>b5", "<Cmd>:LualineBuffersJump! 5<CR>", desc = "Show Buffer 5" },
|
|
||||||
{ "<leader>b6", "<Cmd>:LualineBuffersJump! 6<CR>", desc = "Show Buffer 6" },
|
|
||||||
{ "<leader>b7", "<Cmd>:LualineBuffersJump! 7<CR>", desc = "Show Buffer 7" },
|
|
||||||
{ "<leader>b8", "<Cmd>:LualineBuffersJump! 8<CR>", desc = "Show Buffer 8" },
|
|
||||||
{ "<leader>b9", "<Cmd>:LualineBuffersJump! 9<CR>", desc = "Show Buffer 9" },
|
|
||||||
{ "<leader>b0", "<Cmd>:LualineBuffersJump! 10<CR>", desc = "Show Buffer 10" },
|
|
||||||
{
|
|
||||||
"<leader>bb",
|
|
||||||
function()
|
|
||||||
local index = tonumber(vim.fn.input("Jump to Buffer: "))
|
|
||||||
if index then
|
|
||||||
vim.cmd("LualineBuffersJump! " .. index)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
desc = "Show Buffer ?"
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,147 +0,0 @@
|
|||||||
--[[
|
|
||||||
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠚⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠗⢀
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣄⡉⠓⠦⣌⡙⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⢋⣡⠴⠚⢉⣠⣤⣀
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣶⣿⣿⣿⣿⣿⣷⣦⣄⡉⠓⠦⣌⡙⠻⢿⣿⣿⣿⣿⣿⣿⡿⠟⢋⣡⠴⠚⢉⣠⣴⣾⣿⣿⣿⣿⣿⣶⣤
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠐⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠓⠦⣌⡙⠻⠟⢋⣡⠴⠚⢉⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⠂
|
|
||||||
⠀⠀⠀⠀⢀⣠⣴⣆⡈⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠃⠘⢉⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢁⣰⣦⣄⡀
|
|
||||||
⠀⠀⠐⠾⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠷⠂
|
|
||||||
⠀⢸⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⡇
|
|
||||||
⠀⢸⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⡇
|
|
||||||
⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⡆⢰⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
|
|
||||||
⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠃⠘⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⡇⢸⣿⣿⣿⣿⠿⠛⠉
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⡇⢸⠿⠛⠉
|
|
||||||
|
|
||||||
__ _ _
|
|
||||||
/ _|___ ___| |_ __ _ ___| | __
|
|
||||||
| ||_ /____/ __| __/ _` |/ __| |/ /
|
|
||||||
| _/ /_____\__ \ || (_| | (__| <
|
|
||||||
|_|/___| |___/\__\__,_|\___|_|\_\
|
|
||||||
|
|
||||||
Neovim 0.12 configuration
|
|
||||||
(c) Frnk Zechert 2026
|
|
||||||
]]
|
|
||||||
|
|
||||||
return {
|
|
||||||
{
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
version = "*",
|
|
||||||
dependencies = {
|
|
||||||
{ "nvim-lua/plenary.nvim" },
|
|
||||||
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
|
||||||
{ "nvim-telescope/telescope-ui-select.nvim" },
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
defaults = {
|
|
||||||
mappings = {
|
|
||||||
i = {
|
|
||||||
["<C-h>"] = "which_key",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
pickers = {
|
|
||||||
},
|
|
||||||
extensions = {
|
|
||||||
fzf = {
|
|
||||||
fuzzy = true,
|
|
||||||
override_generic_sorter = true,
|
|
||||||
override_file_sorter = true,
|
|
||||||
case_mode = "smart_case",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
local telescope = require("telescope")
|
|
||||||
local builtin = require("telescope.builtin")
|
|
||||||
local actions = require("telescope.actions")
|
|
||||||
local config = require("telescope.config")
|
|
||||||
|
|
||||||
-- find in hidden files and folders, but never inside the .git folder
|
|
||||||
local vimgrep_args = { unpack(config.values.vimgrep_arguments) }
|
|
||||||
table.insert(vimgrep_args, "--hidden")
|
|
||||||
table.insert(vimgrep_args, "--glob")
|
|
||||||
table.insert(vimgrep_args, "!**/.git/*")
|
|
||||||
|
|
||||||
opts = vim.tbl_deep_extend("force", opts, {
|
|
||||||
defaults = {
|
|
||||||
vimgrep_arguments = vimgrep_args,
|
|
||||||
},
|
|
||||||
pickers = {
|
|
||||||
buffers = {
|
|
||||||
mappings = {
|
|
||||||
i = {
|
|
||||||
["<C-d>"] = actions.delete_buffer + actions.move_to_top
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
extensions = {
|
|
||||||
["ui-select"] = {
|
|
||||||
require("telescope.themes").get_cursor({})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
telescope.setup(opts)
|
|
||||||
telescope.load_extension("ui-select")
|
|
||||||
telescope.load_extension("fzf")
|
|
||||||
|
|
||||||
local function is_git_repo()
|
|
||||||
vim.fn.system("git rev-parse --is-inside-work-tree")
|
|
||||||
return vim.v.shell_error == 0
|
|
||||||
end
|
|
||||||
|
|
||||||
local function get_git_root()
|
|
||||||
local dot_git_path = vim.fn.finddir(".git", ".;")
|
|
||||||
return vim.fn.fnamemodify(dot_git_path, ":h")
|
|
||||||
end
|
|
||||||
|
|
||||||
local function live_grep_in_project(opts)
|
|
||||||
local opts = opts or {}
|
|
||||||
if is_git_repo() then
|
|
||||||
opts.cwd = get_git_root()
|
|
||||||
end
|
|
||||||
builtin.live_grep(opts)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function find_in_project(opts)
|
|
||||||
local opts = opts or {}
|
|
||||||
if is_git_repo() then
|
|
||||||
opts.cwd = get_git_root()
|
|
||||||
end
|
|
||||||
builtin.find_files(opts)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Pickers
|
|
||||||
vim.keymap.set("n", "<leader>ff", find_in_project, { desc = "Find Files in Project" })
|
|
||||||
vim.keymap.set("n", "<leader>fs", live_grep_in_project, { desc = "Live Grep in Project" })
|
|
||||||
vim.keymap.set("n", "<leader>fS", function()
|
|
||||||
live_grep_in_project({grep_open_files = true, prompt_title = "Live Grep in Open Files"})
|
|
||||||
end, { desc = "Live Grep in Open Files" })
|
|
||||||
vim.keymap.set({"n", "v"}, "<leader>fw", builtin.grep_string, { desc = "Find Word" })
|
|
||||||
vim.keymap.set("n", "<leader><leader>", builtin.buffers, { desc = "Find Buffers" })
|
|
||||||
vim.keymap.set("n", "<leader>fr", builtin.oldfiles, { desc = "Find Recent Files" })
|
|
||||||
vim.keymap.set("n", "<leader>fh", builtin.help_tags, { desc = "Find Help" })
|
|
||||||
vim.keymap.set("n", "<leader>fq", builtin.quickfix, { desc = "Quickfix" })
|
|
||||||
vim.keymap.set("n", "<leader>fQ", builtin.quickfixhistory, { desc = "Quickfix History" })
|
|
||||||
vim.keymap.set("n", "<leader>fT", builtin.filetypes, { desc = "Show Filetypes" })
|
|
||||||
vim.keymap.set("n", "<leader>fH", builtin.quickfixhistory, { desc = "Find Highlights" })
|
|
||||||
vim.keymap.set("n", "<leader>fc", builtin.quickfixhistory, { desc = "Find Resume" })
|
|
||||||
vim.keymap.set("n", "<leader>fd", builtin.diagnostics, { desc = "Find Diagnostics" })
|
|
||||||
vim.keymap.set("n", "<leader>fC", builtin.commands, { desc = "Find Commands" })
|
|
||||||
vim.keymap.set("n", "<leader>f+", builtin.builtin, { desc = "All Pickers" })
|
|
||||||
-- Git Pickers
|
|
||||||
vim.keymap.set("n", "<leader>fgc", builtin.git_commits, { desc = "Git Commits" })
|
|
||||||
vim.keymap.set("n", "<leader>fgC", builtin.git_bcommits, { desc = "Git Buffer Commits" })
|
|
||||||
vim.keymap.set("n", "<leader>fgb", builtin.git_branches, { desc = "Git Branches" })
|
|
||||||
vim.keymap.set("n", "<leader>fgs", builtin.git_status, { desc = "Git Status" })
|
|
||||||
vim.keymap.set("n", "<leader>fgS", builtin.git_stash, { desc = "Git Stash" })
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
--[[
|
|
||||||
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠚⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠗⢀
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣄⡉⠓⠦⣌⡙⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⢋⣡⠴⠚⢉⣠⣤⣀
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣶⣿⣿⣿⣿⣿⣷⣦⣄⡉⠓⠦⣌⡙⠻⢿⣿⣿⣿⣿⣿⣿⡿⠟⢋⣡⠴⠚⢉⣠⣴⣾⣿⣿⣿⣿⣿⣶⣤
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠐⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠓⠦⣌⡙⠻⠟⢋⣡⠴⠚⢉⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⠂
|
|
||||||
⠀⠀⠀⠀⢀⣠⣴⣆⡈⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠃⠘⢉⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢁⣰⣦⣄⡀
|
|
||||||
⠀⠀⠐⠾⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠷⠂
|
|
||||||
⠀⢸⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⡇
|
|
||||||
⠀⢸⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⡇
|
|
||||||
⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⡆⢰⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
|
|
||||||
⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠃⠘⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⡇⢸⣿⣿⣿⣿⠿⠛⠉
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⡇⢸⠿⠛⠉
|
|
||||||
|
|
||||||
__ _ _
|
|
||||||
/ _|___ ___| |_ __ _ ___| | __
|
|
||||||
| ||_ /____/ __| __/ _` |/ __| |/ /
|
|
||||||
| _/ /_____\__ \ || (_| | (__| <
|
|
||||||
|_|/___| |___/\__\__,_|\___|_|\_\
|
|
||||||
|
|
||||||
Neovim 0.12 configuration
|
|
||||||
(c) Frank Zechert 2026
|
|
||||||
]]
|
|
||||||
|
|
||||||
return {
|
|
||||||
{
|
|
||||||
"folke/todo-comments.nvim",
|
|
||||||
dependencies = {
|
|
||||||
{ "nvim-lua/plenary.nvim" },
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
signs = true,
|
|
||||||
sign_priority = 8,
|
|
||||||
keywords = {
|
|
||||||
FIX = {
|
|
||||||
icon = vim.g.ui.symbols.todo_comments.error.icon,
|
|
||||||
},
|
|
||||||
TODO = {
|
|
||||||
icon = vim.g.ui.symbols.todo_comments.todo.icon,
|
|
||||||
},
|
|
||||||
HACK = {
|
|
||||||
icon = vim.g.ui.symbols.todo_comments.hack.icon,
|
|
||||||
},
|
|
||||||
WARN = {
|
|
||||||
icon = vim.g.ui.symbols.todo_comments.warn.icon,
|
|
||||||
},
|
|
||||||
PERF = {
|
|
||||||
icon = vim.g.ui.symbols.todo_comments.perf.icon,
|
|
||||||
},
|
|
||||||
NOTE = {
|
|
||||||
icon = vim.g.ui.symbols.todo_comments.note.icon,
|
|
||||||
},
|
|
||||||
TEST = {
|
|
||||||
icon = vim.g.ui.symbols.todo_comments.test.icon,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
local todocomments = require("todo-comments")
|
|
||||||
todocomments.setup(opts)
|
|
||||||
|
|
||||||
vim.keymap.set("n", "]t", todocomments.jump_next, { desc = "Next TODO comment" })
|
|
||||||
vim.keymap.set("n", "[t", todocomments.jump_prev, { desc = "Previous TODO comment" })
|
|
||||||
vim.keymap.set("n", "ft", "<Cmd>:TodoTelescope<CR>" , { desc = "Find TODO comment" })
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+47
-47
@@ -1,5 +1,6 @@
|
|||||||
--[[
|
--[[
|
||||||
|
|
||||||
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
@@ -25,54 +26,53 @@
|
|||||||
| _/ /_____\__ \ || (_| | (__| <
|
| _/ /_____\__ \ || (_| | (__| <
|
||||||
|_|/___| |___/\__\__,_|\___|_|\_\
|
|_|/___| |___/\__\__,_|\___|_|\_\
|
||||||
|
|
||||||
Neovim 0.12 configuration
|
Neovim v0.12 configuration
|
||||||
(c) Frank Zechert 2026
|
(C) Frank Zechert 2026
|
||||||
]]
|
]]
|
||||||
|
|
||||||
return {
|
vim.pack.add({
|
||||||
{
|
{ src = "https://github.com/nvim-tree/nvim-web-devicons" },
|
||||||
"folke/trouble.nvim",
|
{ src = "https://github.com/folke/trouble.nvim" },
|
||||||
dependencies = {
|
})
|
||||||
{ "nvim-tree/nvim-web-devicons" },
|
|
||||||
},
|
local trouble = require("trouble")
|
||||||
opts = {
|
trouble.setup({
|
||||||
},
|
auto_preview = true,
|
||||||
keys = {
|
auto_refresh = true,
|
||||||
{
|
auto_jump = false,
|
||||||
"<leader>xx",
|
auto_close = true,
|
||||||
"<cmd>Trouble diagnostics toggle<cr>",
|
modes = {
|
||||||
desc = "Diagnostics",
|
diagnostics = {
|
||||||
},
|
preview = {
|
||||||
{
|
type = "split",
|
||||||
"<leader>xX",
|
relative = "win",
|
||||||
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
|
position = "right",
|
||||||
desc = "Buffer Diagnostics",
|
size = 0.4
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>xs",
|
|
||||||
"<cmd>Trouble symbols toggle focus=false<cr>",
|
|
||||||
desc = "Symbols",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>xl",
|
|
||||||
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
|
|
||||||
desc = "LSP Definitions / references / ...",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>xL",
|
|
||||||
"<cmd>Trouble loclist toggle<cr>",
|
|
||||||
desc = "Location List",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>xQ",
|
|
||||||
"<cmd>Trouble qflist toggle<cr>",
|
|
||||||
desc = "Quickfix List",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>xt",
|
|
||||||
"<cmd>Trouble todo<cr>",
|
|
||||||
desc = "Todo List",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
lsp_declarations = {
|
||||||
}
|
preview = {
|
||||||
|
type = "split",
|
||||||
|
relative = "win",
|
||||||
|
position = "right",
|
||||||
|
size = 0.4
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lsp_definitions = {
|
||||||
|
preview = {
|
||||||
|
type = "split",
|
||||||
|
relative = "win",
|
||||||
|
position = "right",
|
||||||
|
size = 0.4
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lsp_references = {
|
||||||
|
preview = {
|
||||||
|
type = "split",
|
||||||
|
relative = "win",
|
||||||
|
position = "right",
|
||||||
|
size = 0.4
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|||||||
+18
-33
@@ -1,5 +1,6 @@
|
|||||||
--[[
|
--[[
|
||||||
|
|
||||||
|
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀
|
||||||
@@ -25,38 +26,22 @@
|
|||||||
| _/ /_____\__ \ || (_| | (__| <
|
| _/ /_____\__ \ || (_| | (__| <
|
||||||
|_|/___| |___/\__\__,_|\___|_|\_\
|
|_|/___| |___/\__\__,_|\___|_|\_\
|
||||||
|
|
||||||
Neovim 0.12 configuration
|
Neovim v0.12 configuration
|
||||||
(c) Frank Zechert 2026
|
(C) Frank Zechert 2026
|
||||||
]]
|
]]
|
||||||
|
|
||||||
return {
|
vim.pack.add({
|
||||||
{
|
{ src = "https://github.com/folke/which-key.nvim" },
|
||||||
"folke/which-key.nvim",
|
})
|
||||||
dependencies = {
|
|
||||||
{ "nvim-mini/mini.icons" },
|
local wk = require("which-key")
|
||||||
{ "nvim-tree/nvim-web-devicons" },
|
|
||||||
},
|
wk.setup({
|
||||||
event = "VeryLazy",
|
preset = "modern"
|
||||||
opts = {
|
})
|
||||||
preset = "modern",
|
wk.add({
|
||||||
spec = {
|
{ "<leader>b", group = "Buffers..." },
|
||||||
{ "<leader>b", group = "Buffers" },
|
{ "<leader>x", group = "Trouble..." },
|
||||||
{ "<leader>f", group = "Find (Telescope)" },
|
{ "gr", group = "LSP...", mode = {"n","v"} },
|
||||||
{ "<leader>fg", group = "Git (Telescope)" },
|
{ "<leader>t", group = "Toggle..." },
|
||||||
{ "<leader>h", group = "Git Hunks" },
|
})
|
||||||
{ "<leader>t", group = "Toggle" },
|
|
||||||
{ "<leader>x", group = "Trouble" },
|
|
||||||
{ "gr", group = "LSP Actions" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>?",
|
|
||||||
function()
|
|
||||||
require("which-key").show({ global = false })
|
|
||||||
end,
|
|
||||||
desc = "Buffer Local Keymaps"
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"plugins": {
|
||||||
|
"catppuccin": {
|
||||||
|
"rev": "e068ab5f8261f23f6f71ffd8791ae40315b77b9c",
|
||||||
|
"src": "https://github.com/catppuccin/nvim"
|
||||||
|
},
|
||||||
|
"lualine.nvim": {
|
||||||
|
"rev": "221ce6b2d999187044529f49da6554a92f740a96",
|
||||||
|
"src": "https://github.com/nvim-lualine/lualine.nvim"
|
||||||
|
},
|
||||||
|
"nvim-lspconfig": {
|
||||||
|
"rev": "bfcc0171a43f22afa61d927ffe9fcb6cb85dc99e",
|
||||||
|
"src": "https://github.com/neovim/nvim-lspconfig"
|
||||||
|
},
|
||||||
|
"nvim-web-devicons": {
|
||||||
|
"rev": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c",
|
||||||
|
"src": "https://github.com/nvim-tree/nvim-web-devicons"
|
||||||
|
},
|
||||||
|
"trouble.nvim": {
|
||||||
|
"rev": "bd67efe408d4816e25e8491cc5ad4088e708a69a",
|
||||||
|
"src": "https://github.com/folke/trouble.nvim"
|
||||||
|
},
|
||||||
|
"which-key.nvim": {
|
||||||
|
"rev": "3aab2147e74890957785941f0c1ad87d0a44c15a",
|
||||||
|
"src": "https://github.com/folke/which-key.nvim"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
git
|
git
|
||||||
|
make
|
||||||
|
unzip
|
||||||
tree-sitter-cli
|
tree-sitter-cli
|
||||||
fzf
|
fzf
|
||||||
ripgrep
|
ripgrep
|
||||||
fd
|
fd
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
|
lua-language-server
|
||||||
|
|||||||
Reference in New Issue
Block a user