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
+9 -2
View File
@@ -5,6 +5,7 @@ autocmd("LspAttach", {
local client = vim.lsp.get_client_by_id( args.data.client_id )
if client then
vim.lsp.document_color.enable(false, args.buf, { "background" })
-- require("workspace-diagnostics").populate_workspace_diagnostics(client, 0)
end
end,
})
@@ -13,8 +14,14 @@ autocmd("VimLeave", {
command = "set guicursor=a:ver25-Cursor"
})
autocmd({ "CursorHold" }, {
-- autocmd({ "CursorHold" }, {
-- callback = function()
-- vim.diagnostic.open_float(nil, { focus = false })
-- end
-- })
autocmd({ "InsertLeave" }, {
callback = function()
vim.diagnostic.open_float(nil, { focus = false })
require("lint").try_lint()
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" },
},
}
+24 -24
View File
@@ -1,37 +1,37 @@
require("auto-session").setup ({
{
enabled = true,
root_dir = vim.fn.stdpath "data" .. "/sessions/",
auto_save = true,
auto_restore = true,
auto_create = true,
suppressed_dirs = nil,
allowed_dirs = nil,
auto_restore_last_session = false,
use_git_branch = false,
lazy_support = true,
bypass_save_filetypes = nil,
close_unsupported_windows = true,
args_allow_single_directory = true,
args_allow_files_auto_save = false,
continue_restore_on_error = true,
show_auto_restore_notif = false,
cwd_change_handling = false,
lsp_stop_on_restore = false,
log_level = "error",
enabled = true,
root_dir = vim.fn.stdpath "data" .. "/sessions/",
auto_save = true,
auto_restore = true,
auto_create = true,
suppressed_dirs = nil,
allowed_dirs = nil,
auto_restore_last_session = false,
use_git_branch = false,
lazy_support = true,
bypass_save_filetypes = nil,
close_unsupported_windows = true,
args_allow_single_directory = true,
args_allow_files_auto_save = false,
continue_restore_on_error = true,
show_auto_restore_notif = false,
cwd_change_handling = false,
lsp_stop_on_restore = false,
log_level = "error",
session_lens = {
load_on_setup = true,
theme_conf = {
load_on_setup = true,
theme_conf = {
},
previewer = false,
previewer = false,
mappings = {
delete_session = { "i", "<C-D>" },
alternate_session = { "i", "<C-S>" },
copy_session = { "i", "<C-Y>" },
},
session_control = {
control_dir = vim.fn.stdpath "data" .. "/auto_session/",
control_filename = "session_control.json",
control_dir = vim.fn.stdpath "data" .. "/auto_session/",
control_filename = "session_control.json",
},
},
}
+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_lsp = require("cmp_nvim_lsp")
local capabilities = vim.tbl_deep_extend(
@@ -229,8 +243,16 @@ local servers = {
"sourcekit",
"qmlls",
"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)
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
local lint_progress = function()
local linters = require("lint").get_running()
if #linters == 0 then
return ""
end
return table.concat(linters, ", ")
end
require("lualine").setup {
laststatus = 0,
options = {
@@ -132,9 +140,13 @@ require("lualine").setup {
ime_state,
color = { fg = "black", bg = "#f46868" },
},
{
lint_progress,
icon = "󱉶 ",
},
{
get_active_lsp,
icon = "LSP:",
icon = "",
},
{
"diagnostics",
+1 -1
View File
@@ -2,7 +2,7 @@ require("tmux").setup({
copy_sync = {
enable = true,
redirect_to_clipboard = true,
sync_clipboard = true,
sync_clipboard = false,
sync_registers = true,
},
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" })
-- Alt + Arrow Key to change buffer
-- map("n", "<A-Left>", "<C-w>h", { desc = "Move to left split" })
-- map("n", "<A-Down>", "<C-w>j", { desc = "Move to bottom split" })
-- map("n", "<A-Up>", "<C-w>k", { desc = "Move to top split" })
-- map("n", "<A-Right>", "<C-w>l", { desc = "Move to right split" })
map("n", "<A-Left>", "<cmd>KittyNavigateLeft<CR>", { desc = "Move to left split" })
map("n", "<A-Down>", "<cmd>KittyNavigateDown<CR>", { desc = "Move to bottom split" })
map("n", "<A-Up>", "<cmd>KittyNavigateUp<CR>", { desc = "Move to top 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-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-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-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-Right>", "<cmd>lua require('tmux').resize_right()<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-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-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-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-Right>", "<cmd>lua require('tmux').resize_right()<CR>", { desc = "Move to right split" })
-- Copilot Chat buffer
map("n", "<A-c>", vim.cmd.CopilotChatToggle)
@@ -77,3 +77,12 @@ map("n", "<C-q>", function() Snacks.terminal.toggle() end, { desc = "Toggle Term
-- Gitbrowse
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.opt.listchars = { tab = "··", trail = "·", nbsp = "_" }
vim.opt.laststatus = 3
vim.opt.wrap = true
vim.opt.linebreak = true
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-tpipeline
vim.g.tpipeline_restore = 1
vim.api.nvim_create_user_command('Redir', function(ctx)
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 {
-- {
-- "nvimdev/lspsaga.nvim",
-- config = function()
-- require("config.lspsaga")
-- end,
-- dependencies = {
-- "nvim-tree/nvim-web-devicons",
-- "nvim-treesitter/nvim-treesitter",
-- },
-- },
{
"nvim-mini/mini.nvim",
version = false,
@@ -65,16 +75,6 @@ return {
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
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")
end,
},
@@ -274,10 +274,49 @@ return {
}),
}
},
-- {
-- "aserowy/tmux.nvim",
-- config = function()
-- require("config.tmux")
-- end,
-- },
{
"aserowy/tmux.nvim",
"aznhe21/actions-preview.nvim",
config = function()
require("config.tmux")
require("config.actions-preview")
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")
},
}