Merge commit '85165468f589dbb395b73f0cb17b758ac6fe33aa'

This commit is contained in:
2025-11-10 17:46:25 +01:00
38 changed files with 1388 additions and 144 deletions

View File

@@ -1 +1,3 @@
require("auto-session").setup({})
require("auto-session").setup({
auto_session_enabled = vim.env.KITTY_SCROLLBACK_NVIM ~= "true", -- See kitty-scrollback.nvim
})

View File

@@ -1,6 +1,6 @@
require("conform").setup({
format_on_save = {
lsp_fallback = true,
format_after_save = {
lsp_fallback = false,
async = false,
timeout_ms = 500,
},
@@ -16,14 +16,14 @@ require("conform").setup({
lua = { "stylua" }, -- configured in stylua.toml
markdown = { "prettierd", "prettier", stop_after_first = true },
nix = { "nixfmt" },
javascript = { "prettierd", "prettier", stop_after_first = true },
javascriptreact = { "prettierd", "prettier", stop_after_first = true },
javascript = { "eslint_d", "eslint", "prettierd", "prettier", stop_after_first = true },
javascriptreact = { "eslint_d", "eslint", "prettierd", "prettier", stop_after_first = true },
json = { "prettierd", "prettier", stop_after_first = true },
jsonc = { "prettierd", "prettier", stop_after_first = true },
python = { "isort", "black" },
svelte = { "prettierd", "prettier", stop_after_first = true },
typescript = { "prettierd", "prettier", stop_after_first = true },
typescriptreact = { "prettierd", "prettier", stop_after_first = true },
yaml = { "prettierd", "prettier", stop_after_first = true },
svelte = { "eslint_d", "prettierd", "prettier", stop_after_first = true },
typescript = { "eslint_d", "prettierd", "prettier", stop_after_first = true },
typescriptreact = { "eslint_d", "eslint", "prettierd", "prettier", stop_after_first = true },
-- yaml = { "prettierd", "prettier", stop_after_first = true },
},
})

View File

@@ -1,8 +1,12 @@
local gitsigns = require("gitsigns")
gitsigns.setup({
current_line_blame_opts = { delay = 0 },
current_line_blame_formatter = "<author>, <author_time:%R> - <summary>",
linehl = true,
current_line_blame_opts = {
delay = 0,
virt_text_pos = "right_align",
},
})
vim.api.nvim_create_user_command("Blame", gitsigns.toggle_current_line_blame, { nargs = "?" })

View File

@@ -0,0 +1 @@
require("kitty-scrollback").setup()

View File

@@ -1,7 +1,5 @@
require("neodev").setup() -- should setup before lspconfig
local lspconfig = require("lspconfig")
-- vim.g.coq_settings = { auto_start = 'shut-up' }
-- local capabilities = coq.lsp_ensure_capabilities()
@@ -34,7 +32,38 @@ local servers = {
},
},
},
lua_ls = {},
lua_ls = {
on_init = function(client)
if client.workspace_folders then
local path = client.workspace_folders[1].name
if
path ~= vim.fn.stdpath("config")
and (vim.uv.fs_stat(path .. "/.luarc.json") or vim.uv.fs_stat(path .. "/.luarc.jsonc"))
then
return
end
end
client.config.settings.Lua = vim.tbl_deep_extend("force", client.config.settings.Lua, {
runtime = {
version = "LuaJIT",
path = {
"lua/?.lua",
"lua/?/init.lua",
},
},
workspace = {
checkThirdParty = false,
library = {
vim.env.VIMRUNTIME,
},
},
})
end,
settings = {
Lua = {},
},
},
-- marksman = {},
nixd = {},
pyright = {},
@@ -104,9 +133,11 @@ local servers = {
for server, config in pairs(servers) do
config.capabilities = capabilities
lspconfig[server].setup(config)
vim.lsp.config(server, config)
end
vim.lsp.enable(vim.tbl_keys(servers))
vim.api.nvim_create_autocmd("LspAttach", {
callback = function(e)
local opts = { buffer = e.bufnr }

View File

@@ -63,6 +63,7 @@ cmp.setup({
}),
sources = {
{ name = "copilot", group_index = 2 },
{ name = "zk" },
{ name = "nvim_lsp", keyword_length = 8 },
{ name = "luasnip", max_item_count = 16 },
{ name = "path" },

View File

@@ -1,6 +0,0 @@
vim.cmd([[
let g:taskwiki_taskrc_location='/home/h/.config/task/taskrc'
let g:taskwiki_disable_concealcursor=1
let g:taskwiki_dont_preserve_folds=1
let g:taskwiki_dont_fold=1
]])