This commit is contained in:
Zacharias-Brohn
2025-12-08 19:04:57 +01:00
parent 3e7fce3e14
commit 533e740964
15 changed files with 336 additions and 56 deletions
+13
View File
@@ -9,6 +9,17 @@ if vim.env.PROF then
}) })
end end
vim.g.wbr = "test"
local home = os.getenv("HOME")
package.path = package.path
.. ";" .. home .. "/.luarocks/share/lua/5.4/?.lua"
.. ";" .. home .. "/.luarocks/share/lua/5.4/?/init.lua"
package.cpath = package.cpath
.. ";" .. home .. "/.luarocks/lib/lua/5.4/?.so"
vim.cmd('source ' .. vim.fn.stdpath("config") .. "/cursor.vim") vim.cmd('source ' .. vim.fn.stdpath("config") .. "/cursor.vim")
require("config.lazy") require("config.lazy")
require("options") require("options")
@@ -28,3 +39,5 @@ vim.filetype.add({
[".*/uwsm/env.*"] = "zsh", [".*/uwsm/env.*"] = "zsh",
} }
}) })
vim.cmd("colorscheme github_dark")
+9 -2
View File
@@ -5,6 +5,7 @@ autocmd("LspAttach", {
local client = vim.lsp.get_client_by_id( args.data.client_id ) local client = vim.lsp.get_client_by_id( args.data.client_id )
if client then if client then
vim.lsp.document_color.enable(false, args.buf, { "background" }) vim.lsp.document_color.enable(false, args.buf, { "background" })
-- require("workspace-diagnostics").populate_workspace_diagnostics(client, 0)
end end
end, end,
}) })
@@ -13,8 +14,14 @@ autocmd("VimLeave", {
command = "set guicursor=a:ver25-Cursor" command = "set guicursor=a:ver25-Cursor"
}) })
autocmd({ "CursorHold" }, { -- autocmd({ "CursorHold" }, {
-- callback = function()
-- vim.diagnostic.open_float(nil, { focus = false })
-- end
-- })
autocmd({ "InsertLeave" }, {
callback = function() callback = function()
vim.diagnostic.open_float(nil, { focus = false }) require("lint").try_lint()
end end
}) })
+1
View File
@@ -0,0 +1 @@
require("tiny-inline-diagnostic").setup({})
+73
View File
@@ -0,0 +1,73 @@
require("actions-preview").setup {
-- options for vim.diff(): https://neovim.io/doc/user/lua.html#vim.diff()
diff = {
ctxlen = 3,
},
highlight_command = {
-- require("actions-preview.highlight").delta(),
-- require("actions-preview.highlight").diff_so_fancy(),
-- require("actions-preview.highlight").diff_highlight(),
},
-- priority list of preferred backend
backend = { "snacks", "nui" },
-- options related to telescope.nvim
telescope = vim.tbl_extend(
"force",
require("telescope.themes").get_dropdown(),
-- a table for customizing content
{
-- a function to make a table containing the values to be displayed.
-- fun(action: Action): { title: string, client_name: string|nil }
make_value = nil,
-- a function to make a function to be used in `display` of a entry.
-- see also `:h telescope.make_entry` and `:h telescope.pickers.entry_display`.
-- fun(values: { index: integer, action: Action, title: string, client_name: string }[]): function
make_make_display = nil,
}
),
-- options for nui.nvim components
nui = {
-- component direction. "col" or "row"
dir = "col",
-- keymap for selection component: https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/menu#keymap
keymap = nil,
-- options for nui Layout component: https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/layout
layout = {
position = "50%",
size = {
width = "60%",
height = "100%",
},
min_width = 40,
min_height = 10,
relative = "editor",
},
-- options for preview area: https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/popup
preview = {
size = "80%",
border = {
style = "rounded",
padding = { 0, 1 },
},
},
-- options for selection area: https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/menu
select = {
size = "20%",
border = {
style = "rounded",
padding = { 0, 1 },
},
},
},
--- options for snacks picker
---@type snacks.picker.Config
snacks = {
layout = { preset = "default" },
},
}
+35
View File
@@ -0,0 +1,35 @@
return {
"yarospace/dev-tools.nvim",
opts = {
actions = {},
filetypes = {
include = {},
exclude = {},
},
builtin_actions = {
include = {},
exclude = {},
},
action_opts = {
{
group = "Debuggins",
name = "Log vars under cursor",
opts = {
keymap = {
global = "<leader>dl",
picker = "<M-l>",
hide = true,
}
}
}
}
},
ui = {
override = true,
group_actions = true,
}
}
+13
View File
@@ -0,0 +1,13 @@
return {
"Bekaboo/dropbar.nvim",
dependencies = {
"nvim-telescope/telescope-fzf-native.nvim",
run = "make"
},
opts = {
bar = {
}
}
}
+41
View File
@@ -0,0 +1,41 @@
require("lint").linters_by_ft = {
javascript = { "eslint" },
javascriptreact = { "eslint" },
typescript = { "eslint" },
typescriptreact = { "eslint" },
lua = { "luacheck" },
python = { "pylint" },
go = { "golangci_lint" },
rust = { "clippy" },
zsh = { "zsh" },
sh = { "zsh" },
bash = { "zsh" },
cpp = { "cpplint" },
markdown = { "markdownlint" },
json = { "jsonlint" },
yaml = { "yamllint" },
qml = { "qmllint" },
}
local default_severity = {
['error'] = vim.diagnostic.severity.ERROR,
['warning'] = vim.diagnostic.severity.WARN,
['information'] = vim.diagnostic.severity.INFO,
['hint'] = vim.diagnostic.severity.HINT,
}
require("lint").linters.qmllint = {
name = "qmllint",
cmd = "qmllint",
stdin = true,
append_fname = true,
args = {},
stream = nil,
ignore_exitcode = true,
env = nil,
parser = require("lint.parser").from_pattern(
"([^:]+):(%d+) : (.+)",
{ "filename", "lnum", "message" },
default_severity,
{[ "source" ] = "qmllint" }
)
}
+23 -1
View File
@@ -1,3 +1,17 @@
local function flatten_to_array(t)
local res = {}
local function _flatten(tbl)
for _, v in ipairs(tbl) do
if type(v) == "table" then
_flatten(v)
else
table.insert(res, v)
end
end
end
_flatten(t)
return res
end
local cmp = require("cmp") local cmp = require("cmp")
local cmp_lsp = require("cmp_nvim_lsp") local cmp_lsp = require("cmp_nvim_lsp")
local capabilities = vim.tbl_deep_extend( local capabilities = vim.tbl_deep_extend(
@@ -229,8 +243,16 @@ local servers = {
"sourcekit", "sourcekit",
"qmlls", "qmlls",
"tailwindcss", "tailwindcss",
require("mason-lspconfig").get_installed_servers(),
} }
for _, server in ipairs(servers) do local flat_servers = flatten_to_array(servers)
for _, server in ipairs(flat_servers) do
lspconfig(server, {
on_attach = function(client, bufnr)
require("workspace-diagnostics").populate_workspace_diagnostics( client, bufnr )
end,
})
lspenable(server) lspenable(server)
end end
+10
View File
@@ -0,0 +1,10 @@
require("lspsaga").setup({
symbol_in_winbar = {
enable = false,
},
ui = {
code_action = "",
}
})
+13 -1
View File
@@ -75,6 +75,14 @@ local virtual_env = function()
end end
end end
local lint_progress = function()
local linters = require("lint").get_running()
if #linters == 0 then
return ""
end
return table.concat(linters, ", ")
end
require("lualine").setup { require("lualine").setup {
laststatus = 0, laststatus = 0,
options = { options = {
@@ -132,9 +140,13 @@ require("lualine").setup {
ime_state, ime_state,
color = { fg = "black", bg = "#f46868" }, color = { fg = "black", bg = "#f46868" },
}, },
{
lint_progress,
icon = "󱉶 ",
},
{ {
get_active_lsp, get_active_lsp,
icon = "LSP:", icon = "",
}, },
{ {
"diagnostics", "diagnostics",
+1 -1
View File
@@ -2,7 +2,7 @@ require("tmux").setup({
copy_sync = { copy_sync = {
enable = true, enable = true,
redirect_to_clipboard = true, redirect_to_clipboard = true,
sync_clipboard = true, sync_clipboard = false,
sync_registers = true, sync_registers = true,
}, },
navigation = { navigation = {
+22 -13
View File
@@ -10,20 +10,20 @@ map("v", "<C-Up>", ":m '<-2<CR>gv=gv", { desc = "Move selected text up" })
map("v", "<C-Down>", ":m '>+1<CR>gv=gv", { desc = "Move selected text down" }) map("v", "<C-Down>", ":m '>+1<CR>gv=gv", { desc = "Move selected text down" })
-- Alt + Arrow Key to change buffer -- Alt + Arrow Key to change buffer
-- map("n", "<A-Left>", "<C-w>h", { desc = "Move to left split" }) map("n", "<A-Left>", "<cmd>KittyNavigateLeft<CR>", { desc = "Move to left split" })
-- map("n", "<A-Down>", "<C-w>j", { desc = "Move to bottom split" }) map("n", "<A-Down>", "<cmd>KittyNavigateDown<CR>", { desc = "Move to bottom split" })
-- map("n", "<A-Up>", "<C-w>k", { desc = "Move to top split" }) map("n", "<A-Up>", "<cmd>KittyNavigateUp<CR>", { desc = "Move to top split" })
-- map("n", "<A-Right>", "<C-w>l", { desc = "Move to right split" }) map("n", "<A-Right>", "<cmd>KittyNavigateRight<CR>", { desc = "Move to right split" })
map("n", "<A-Left>", "<cmd>lua require('tmux').move_left()<CR>", { desc = "Move to left split" }) -- map("n", "<A-Left>", "<cmd>lua require('tmux').move_left()<CR>", { desc = "Move to left split" })
map("n", "<A-Down>", "<cmd>lua require('tmux').move_bottom()<CR>", { desc = "Move to bottom split" }) -- map("n", "<A-Down>", "<cmd>lua require('tmux').move_bottom()<CR>", { desc = "Move to bottom split" })
map("n", "<A-Up>", "<cmd>lua require('tmux').move_top()<CR>", { desc = "Move to top split" }) -- map("n", "<A-Up>", "<cmd>lua require('tmux').move_top()<CR>", { desc = "Move to top split" })
map("n", "<A-Right>", "<cmd>lua require('tmux').move_right()<CR>", { desc = "Move to right split" }) -- map("n", "<A-Right>", "<cmd>lua require('tmux').move_right()<CR>", { desc = "Move to right split" })
--
map("n", "<C-Left>", "<cmd>lua require('tmux').resize_left()<CR>", { desc = "Move to left split" }) -- map("n", "<C-Left>", "<cmd>lua require('tmux').resize_left()<CR>", { desc = "Move to left split" })
map("n", "<C-Down>", "<cmd>lua require('tmux').resize_bottom()<CR>", { desc = "Move to bottom split" }) -- map("n", "<C-Down>", "<cmd>lua require('tmux').resize_bottom()<CR>", { desc = "Move to bottom split" })
map("n", "<C-Up>", "<cmd>lua require('tmux').resize_top()<CR>", { desc = "Move to top split" }) -- map("n", "<C-Up>", "<cmd>lua require('tmux').resize_top()<CR>", { desc = "Move to top split" })
map("n", "<C-Right>", "<cmd>lua require('tmux').resize_right()<CR>", { desc = "Move to right split" }) -- map("n", "<C-Right>", "<cmd>lua require('tmux').resize_right()<CR>", { desc = "Move to right split" })
-- Copilot Chat buffer -- Copilot Chat buffer
map("n", "<A-c>", vim.cmd.CopilotChatToggle) map("n", "<A-c>", vim.cmd.CopilotChatToggle)
@@ -77,3 +77,12 @@ map("n", "<C-q>", function() Snacks.terminal.toggle() end, { desc = "Toggle Term
-- Gitbrowse -- Gitbrowse
map("n", "<leader>gb", function() Snacks.gitbrowse.open() end ) map("n", "<leader>gb", function() Snacks.gitbrowse.open() end )
-- Actions Previewer
map({"n", "v"}, "<leader>ap", require("actions-preview").code_actions)
map("n", "K", require("pretty_hover").hover)
-- winbar
local dbar_api = require("dropbar.api")
map("n", "<leader>b", dbar_api.pick)
+7 -2
View File
@@ -9,6 +9,7 @@ vim.opt.smartindent = false
vim.o.list = true vim.o.list = true
vim.opt.listchars = { tab = "··", trail = "·", nbsp = "_" } vim.opt.listchars = { tab = "··", trail = "·", nbsp = "_" }
vim.opt.laststatus = 3
vim.opt.wrap = true vim.opt.wrap = true
vim.opt.linebreak = true vim.opt.linebreak = true
vim.opt.swapfile = false vim.opt.swapfile = false
@@ -54,5 +55,9 @@ vim.env.PATH = table.concat({ vim.fn.stdpath "data", "mason", "bin" }, sep) .. d
vim.api.nvim_set_hl( 0, "Cursor", { reverse = true }) vim.api.nvim_set_hl( 0, "Cursor", { reverse = true })
-- vim-tpipeline vim.api.nvim_create_user_command('Redir', function(ctx)
vim.g.tpipeline_restore = 1 local lines = vim.split(vim.api.nvim_exec(ctx.args, true), '\n', { plain = true })
vim.cmd('new')
vim.api.nvim_buf_set_lines(0, 0, -1, false, lines)
vim.opt_local.modified = false
end, { nargs = '+', complete = 'command' })
+51 -12
View File
@@ -1,4 +1,14 @@
return { return {
-- {
-- "nvimdev/lspsaga.nvim",
-- config = function()
-- require("config.lspsaga")
-- end,
-- dependencies = {
-- "nvim-tree/nvim-web-devicons",
-- "nvim-treesitter/nvim-treesitter",
-- },
-- },
{ {
"nvim-mini/mini.nvim", "nvim-mini/mini.nvim",
version = false, version = false,
@@ -65,16 +75,6 @@ return {
"nvim-lualine/lualine.nvim", "nvim-lualine/lualine.nvim",
event = "VeryLazy", event = "VeryLazy",
config = function () config = function ()
if vim.env.TMUX then
vim.api.nvim_create_autocmd({ "FocusGained", "ColorScheme", "VimEnter" }, {
callback = function()
vim.defer_fn( function()
vim.opt.laststatus = 0
end, 100)
end,
})
vim.o.laststatus = 0
end
require("config.lualine") require("config.lualine")
end, end,
}, },
@@ -274,10 +274,49 @@ return {
}), }),
} }
}, },
-- {
-- "aserowy/tmux.nvim",
-- config = function()
-- require("config.tmux")
-- end,
-- },
{ {
"aserowy/tmux.nvim", "aznhe21/actions-preview.nvim",
config = function() config = function()
require("config.tmux") require("config.actions-preview")
end, end,
}, },
{
"mfussenegger/nvim-lint",
config = function()
require("config.lint")
end,
},
{
"rachartier/tiny-inline-diagnostic.nvim",
config = function()
require("config.TID")
end,
},
{
"MunifTanjim/nui.nvim",
},
{
"artemave/workspace-diagnostics.nvim",
},
{
require("config.dev-tools")
},
{
"Fildo7525/pretty_hover",
event = "LspAttach",
opts = {}
},
{
"knubie/vim-kitty-navigator",
build = "cp ./*.py ~/.config/kitty/"
},
{
require("config.dropbar")
},
} }