Compare commits

..

No commits in common. "f160a5b4a75f96769b08eebd2572545b7b8a688b" and "b1f751a82d60d316707fd7aa165323f3475dba08" have entirely different histories.

12 changed files with 53 additions and 145 deletions

View file

@ -24,6 +24,7 @@ vcs = "~"
[nvim.files] [nvim.files]
"nvim/.config/nvim/spell/de.utf-8.add.spl" = { target = "~/.config/nvim/spell/de.utf-8.add.spl", type = "symbolic" } "nvim/.config/nvim/spell/de.utf-8.add.spl" = { target = "~/.config/nvim/spell/de.utf-8.add.spl", type = "symbolic" }
"nvim/.config/nvim/spell/en.utf-8.add.spl" = { target = "~/.config/nvim/spell/en.utf-8.add.spl", type = "symbolic" } "nvim/.config/nvim/spell/en.utf-8.add.spl" = { target = "~/.config/nvim/spell/en.utf-8.add.spl", type = "symbolic" }
"nvim/.config/nvim/snippets/quarto.snippets" = { target = "~/.config/nvim/snippets/quarto.snippets", type = "symbolic" }
nvim = "~" nvim = "~"
[scripts.files] [scripts.files]

View file

@ -35,14 +35,13 @@
"magick": { "branch": "master", "commit": "aa96e77b6d08983707941727a574752445de0d70" }, "magick": { "branch": "master", "commit": "aa96e77b6d08983707941727a574752445de0d70" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
"markmap.nvim": { "branch": "main", "commit": "5fb6755cf5434511cc23a4936c9eb76b9142fba5" }, "markmap.nvim": { "branch": "main", "commit": "5fb6755cf5434511cc23a4936c9eb76b9142fba5" },
"mason-conform.nvim": { "branch": "main", "commit": "f3b96fa2217fcb1513301eefbe10ea0e765e33eb" }, "mason-conform.nvim": { "branch": "main", "commit": "1983f353b29d8716751665c18d57e1ac0473a59a" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "5477d67a5ca12b704f2a8a55a057fc79750f3dbb" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
"mason-nvim-lint": { "branch": "main", "commit": "b579a00ee39dcd590b1023028dc8fb3d203a67b0" }, "mason-nvim-lint": { "branch": "main", "commit": "b579a00ee39dcd590b1023028dc8fb3d203a67b0" },
"mason.nvim": { "branch": "main", "commit": "7f265cd6ae56cecdd0aa50c8c73fc593b0604801" }, "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
"mdeval.nvim": { "branch": "master", "commit": "0e1b248db174a9659a9ab16eb8c90ff3aec55264" }, "mdeval.nvim": { "branch": "master", "commit": "0e1b248db174a9659a9ab16eb8c90ff3aec55264" },
"mini.nvim": { "branch": "main", "commit": "0420076298c4457f200c2de468f65d080597a347" }, "mini.nvim": { "branch": "main", "commit": "0420076298c4457f200c2de468f65d080597a347" },
"molten-nvim": { "branch": "main", "commit": "a286aa914d9a154bc359131aab788b5a077a5a99" }, "molten-nvim": { "branch": "main", "commit": "a286aa914d9a154bc359131aab788b5a077a5a99" },
"neo-tree-jj.nvim": { "branch": "main", "commit": "c6534930c6f79893e12eafbb722ee23e6a83e80e" },
"neo-tree.nvim": { "branch": "main", "commit": "1ef260eb4f54515fe121a2267b477efb054d108a" }, "neo-tree.nvim": { "branch": "main", "commit": "1ef260eb4f54515fe121a2267b477efb054d108a" },
"neogen": { "branch": "main", "commit": "b2e78708876f4da507839726816010a68e33fec8" }, "neogen": { "branch": "main", "commit": "b2e78708876f4da507839726816010a68e33fec8" },
"neotest": { "branch": "master", "commit": "d66cf4e05a116957f0d3a7755a24291c7d1e1f72" }, "neotest": { "branch": "master", "commit": "d66cf4e05a116957f0d3a7755a24291c7d1e1f72" },
@ -53,7 +52,7 @@
"nvim-colorizer.lua": { "branch": "master", "commit": "517df88cf2afb36652830df2c655df2da416a0ae" }, "nvim-colorizer.lua": { "branch": "master", "commit": "517df88cf2afb36652830df2c655df2da416a0ae" },
"nvim-coverage": { "branch": "main", "commit": "a939e425e363319d952a6c35fb3f38b34041ded2" }, "nvim-coverage": { "branch": "main", "commit": "a939e425e363319d952a6c35fb3f38b34041ded2" },
"nvim-lint": { "branch": "master", "commit": "9dfb77ef6c5092a19502883c02dc5a02ec648729" }, "nvim-lint": { "branch": "master", "commit": "9dfb77ef6c5092a19502883c02dc5a02ec648729" },
"nvim-lspconfig": { "branch": "master", "commit": "3ea99227e316c5028f57a4d86a1a7fd01dd876d0" }, "nvim-lspconfig": { "branch": "master", "commit": "fa2662510d30b06168b6e2e6915518decde6bbac" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-surround": { "branch": "main", "commit": "0e62500b98f4513feaaf7425c135472457ea5b7d" }, "nvim-surround": { "branch": "main", "commit": "0e62500b98f4513feaaf7425c135472457ea5b7d" },
"nvim-toggleterm.lua": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, "nvim-toggleterm.lua": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
@ -88,5 +87,5 @@
"which-key.nvim": { "branch": "main", "commit": "fcbf4eea17cb299c02557d576f0d568878e354a4" }, "which-key.nvim": { "branch": "main", "commit": "fcbf4eea17cb299c02557d576f0d568878e354a4" },
"wrapping.nvim": { "branch": "master", "commit": "3a823200c297885b70515fa8d974e1763c578e26" }, "wrapping.nvim": { "branch": "master", "commit": "3a823200c297885b70515fa8d974e1763c578e26" },
"zen-mode.nvim": { "branch": "main", "commit": "04b52674b8c800f8b7d4609e8bd8d0212e3ffa79" }, "zen-mode.nvim": { "branch": "main", "commit": "04b52674b8c800f8b7d4609e8bd8d0212e3ffa79" },
"zk-nvim": { "branch": "main", "commit": "fd1ab2239ed85ca51051c094a49a280f4ed76bb2" } "zk-nvim": { "branch": "main", "commit": "8fdd7032633045ece559273370fc0ec75ee8ffce" }
} }

View file

@ -1,8 +1,8 @@
-- A list of all languages for which I have support for any of: -- A list of all languages for which I have support for any of:
-- an LSP (lsp) -- an LSP
-- Treesitter (ts) -- Treesitter
-- linting (lint) -- linting
-- formatting (format) -- formatting
-- --
-- with their respective names used by lspconfig, nvim-treesitter, nvim-lint and conform. -- with their respective names used by lspconfig, nvim-treesitter, nvim-lint and conform.
-- --
@ -12,16 +12,6 @@ if vim.fn.executable("nufmt") == 1 then
nushell.format = { nu = { "nufmt" } } nushell.format = { nu = { "nufmt" } }
end end
-- FIXME: This does not work for populating LSP config,
-- never gets set MASON env var. Executing too early?
local function mason_dir()
local dir = vim.fn.getenv("MASON")
if dir ~= vim.NIL then
return dir
end
return vim.fn.getenv("HOME") .. "/.local/share/nvim/mason"
end
local languages = { local languages = {
arduino = { lsp = { arduino_language_server = {} }, ts = { "arduino" } }, arduino = { lsp = { arduino_language_server = {} }, ts = { "arduino" } },
awk = { ts = { "awk" }, format = { awk = { "gawk" } } }, awk = { ts = { "awk" }, format = { awk = { "gawk" } } },
@ -117,11 +107,7 @@ local languages = {
lsp = { tinymist = { settings = { formatterMode = "typstyle" } } }, lsp = { tinymist = { settings = { formatterMode = "typstyle" } } },
ts = { "typst" }, ts = { "typst" },
}, },
vue = { vue = { format = { vue = { "prettier", "rustywind" } } },
lsp = { vue_ls = {} },
ts = { "typescript", "vue" },
format = { vue = { "prettier", "rustywind" } },
},
yaml = { lsp = { yamlls = {}, ansiblels = {} }, ts = { "yaml" }, format = { yaml = { "prettier" } } }, yaml = { lsp = { yamlls = {}, ansiblels = {} }, ts = { "yaml" }, format = { yaml = { "prettier" } } },
zsh = { format = { zsh = { "shfmt" } } }, zsh = { format = { zsh = { "shfmt" } } },
@ -372,6 +358,7 @@ local languages = {
"vim", "vim",
"vimdoc", "vimdoc",
"vrl", "vrl",
"vue",
"wgsl", "wgsl",
"wgsl_bevy", "wgsl_bevy",
"wing", "wing",

View file

@ -1,4 +1,15 @@
return { return {
{
"julienvincent/hunk.nvim",
dependencies = {
"MunifTanjim/nui.nvim",
{ "nvim-tree/nvim-web-devicons", optional = true },
},
cmd = { "DiffEditor" },
config = function()
require("hunk").setup()
end,
},
{ {
"akinsho/git-conflict.nvim", "akinsho/git-conflict.nvim",
event = { "InsertEnter", "CursorHold", "VeryLazy" }, event = { "InsertEnter", "CursorHold", "VeryLazy" },
@ -95,17 +106,4 @@ return {
}) })
end, end,
}, },
-- jj diffing
{
"julienvincent/hunk.nvim",
dependencies = {
"MunifTanjim/nui.nvim",
{ "nvim-tree/nvim-web-devicons", optional = true },
},
cmd = { "DiffEditor" },
config = function()
require("hunk").setup()
end,
},
} }

View file

@ -19,9 +19,7 @@ return {
"mfussenegger/nvim-lint", "mfussenegger/nvim-lint",
config = function() config = function()
require("lint").linters_by_ft = linters require("lint").linters_by_ft = linters
if require("lint").linters["markdownlint"] ~= nil then
require("lint").linters.markdownlint.args = { "--stdin", "--disable", "MD013", "--" } require("lint").linters.markdownlint.args = { "--stdin", "--disable", "MD013", "--" }
end
vim.api.nvim_create_autocmd({ "BufWritePost", "InsertLeave" }, { vim.api.nvim_create_autocmd({ "BufWritePost", "InsertLeave" }, {
callback = function() callback = function()
if not vim.g.disable_autolint then if not vim.g.disable_autolint then

View file

@ -1,16 +1,13 @@
local function get_all_servers()
local servers = {} local servers = {}
for _, lang in pairs(Languages) do for _, lang in pairs(Languages) do
if not lang.lsp then if not lang.lsp then
goto continue goto continue
end end
for name, conf in pairs(lang.lsp) do for name, conf in pairs(lang.lsp) do
servers[name] = vim.tbl_deep_extend("force", servers[name] or {}, conf) servers[name] = conf
end end
::continue:: ::continue::
end end
return servers
end
local lsp = { local lsp = {
{ -- pretty lsp 'peek' menus { -- pretty lsp 'peek' menus
@ -30,8 +27,10 @@ local lsp = {
{ "saghen/blink.cmp", optional = true }, { "saghen/blink.cmp", optional = true },
}, },
event = { "BufReadPost", "BufNewFile", "BufWritePre" }, event = { "BufReadPost", "BufNewFile", "BufWritePre" },
opts = { servers = get_all_servers() }, opts = { servers = servers },
config = function(_, lspconfig_opts) config = function(_, lspconfig_opts)
local lspconfig = require("lspconfig")
-- Display diagnostics as virtual text only if not in insert mode -- Display diagnostics as virtual text only if not in insert mode
-- /r/neovim/comments/12inp4c/disable_diagnostics_virtual_text_when_in_insert/jqqifwk/ -- /r/neovim/comments/12inp4c/disable_diagnostics_virtual_text_when_in_insert/jqqifwk/
vim.diagnostic.config({ virtual_text = true }) vim.diagnostic.config({ virtual_text = true })
@ -51,22 +50,16 @@ local lsp = {
vim.fn.sign_define("DiagnosticSignInfo", { text = "", texthl = "DiagnosticSignInfo" }) vim.fn.sign_define("DiagnosticSignInfo", { text = "", texthl = "DiagnosticSignInfo" })
vim.fn.sign_define("DiagnosticSignHint", { text = "", texthl = "DiagnosticSignHint" }) vim.fn.sign_define("DiagnosticSignHint", { text = "", texthl = "DiagnosticSignHint" })
local function register(server_name, config) for server, config in pairs(lspconfig_opts.servers) do
if vim.fn.has("nvim-0.11") == 1 then if vim.fn.has("nvim-0.11") == false then
vim.lsp.config(server_name, config)
else
require("lspconfig")[server_name].setup(config)
end
end
for server_name, config in pairs(lspconfig_opts.servers) do
register(server_name, config)
if vim.fn.has("nvim-0.11") == 0 then
config.capabilities = require("blink.cmp").get_lsp_capabilities(config.capabilities) config.capabilities = require("blink.cmp").get_lsp_capabilities(config.capabilities)
end end
lspconfig[server].setup(config)
end end
register("marksman", { lspconfig.nushell.setup({})
lspconfig.marksman.setup({
filetypes = { "markdown", "quarto" }, filetypes = { "markdown", "quarto" },
on_attach = function(client, _) on_attach = function(client, _)
-- TODO: for some reason this stays true even after rootdir switch? -- TODO: for some reason this stays true even after rootdir switch?
@ -119,7 +112,7 @@ local lsp = {
local python_path local python_path
-- ensure python virtualenv is determined automatically on lsp start -- ensure python virtualenv is determined automatically on lsp start
-- we primarily use pyright for cmp lsp completion & hover info -- we primarily use pyright for cmp lsp completion & hover info
register("basedpyright", { lspconfig.basedpyright.setup({
on_attach = function(client, _) on_attach = function(client, _)
require("core.util").set_python_env() require("core.util").set_python_env()
if python_path == nil then if python_path == nil then
@ -141,7 +134,7 @@ local lsp = {
}, },
}, },
}) })
register("ruff", { lspconfig.ruff.setup({
on_attach = function(client, _) on_attach = function(client, _)
require("core.util").set_python_env() require("core.util").set_python_env()
client.server_capabilities.hoverProvider = false -- we use pyright for hover info client.server_capabilities.hoverProvider = false -- we use pyright for hover info
@ -155,33 +148,16 @@ local lsp = {
-- set up arduino with the help of arduino.nvim plugin -- set up arduino with the help of arduino.nvim plugin
if require("core.util").is_available("arduino") then if require("core.util").is_available("arduino") then
register("arduino_language_server", { lspconfig.arduino_language_server.setup({
on_new_config = require("arduino").on_new_config, on_new_config = require("arduino").on_new_config,
}) })
end end
if vim.lsp.is_enabled("vue_ls") then
register("ts_ls", {
init_options = {
plugins = {
{
name = "@vue/typescript-plugin",
location = vim.fn.expand("$MASON/packages")
.. "/vue-language-server"
.. "/node_modules/@vue/language-server",
languages = { "vue" },
},
},
},
filetypes = { "typescript", "javascript", "javascriptreact", "typescriptsreact", "vue" },
})
end
-- attach ltex for fitting ft only when spell checking becomes enabled -- attach ltex for fitting ft only when spell checking becomes enabled
vim.api.nvim_create_autocmd("User", { vim.api.nvim_create_autocmd("User", {
pattern = "SpellEnable", pattern = "SpellEnable",
callback = function() callback = function()
register("ltex", { lspconfig.ltex.setup({
on_attach = function(_, _) on_attach = function(_, _)
if require("core.util").is_available("ltex_extra") then if require("core.util").is_available("ltex_extra") then
require("ltex_extra").setup() require("ltex_extra").setup()

View file

@ -38,54 +38,13 @@ return { -- file/item pickers and managers
}) })
end, end,
cmd = "Neotree", cmd = "Neotree",
opts = function(_, opts) opts = {
opts.sources = { "filesystem", "git_status", "buffers" } source_selector = { winbar = true },
opts.source_selector = {
winbar = true,
sources = {
{ source = "filesystem" },
{ source = "git_status" },
}, },
}
opts.close_if_last_window = true
opts.enable_cursor_hijack = true
end,
keys = { keys = {
{ "<leader>se", "<cmd>Neotree toggle left<cr>", desc = "filetree", silent = true }, { "<leader>se", "<cmd>Neotree toggle left<cr>", desc = "filetree", silent = true },
}, },
}, },
{ -- substituting git tree listing with jj listing if in jj repo
dependencies = { "Cretezy/neo-tree-jj.nvim" },
"nvim-neo-tree/neo-tree.nvim",
optional = true,
opts = function(_, opts)
opts.sources = opts.sources or {}
opts.source_selector = opts.source_selector or {}
-- Add jj source as available
table.insert(opts.sources, "jj")
-- If there is a git tab in neo-tree replace it when in jj repo
if require("neo-tree.sources.jj.utils").get_repository_root() then
-- Remove git tab
if opts.source_selector.sources then
for i, source in ipairs(opts.source_selector.sources) do
if source.source == "git_status" then
table.remove(opts.source_selector.sources, i)
break
end
end
else
opts.source_selector.sources = {}
end
-- Add jj tab
table.insert(opts.source_selector.sources, {
display_name = "󰊢 JJ",
source = "jj",
})
end
end,
},
{ "MagicDuck/grug-far.nvim", opts = {}, cmd = "GrugFar" }, { "MagicDuck/grug-far.nvim", opts = {}, cmd = "GrugFar" },
{ {
"ibhagwan/fzf-lua", "ibhagwan/fzf-lua",

View file

@ -70,7 +70,6 @@ local prose_plugs = {
"MeanderingProgrammer/render-markdown.nvim", "MeanderingProgrammer/render-markdown.nvim",
main = "render-markdown", main = "render-markdown",
opts = { opts = {
file_types = { "markdown", "codecompanion" },
render_modes = { "n", "c", "i" }, render_modes = { "n", "c", "i" },
code = { code = {
sign = false, sign = false,
@ -213,11 +212,9 @@ local prose_plugs = {
require("zk").setup({ require("zk").setup({
picker = picker, picker = picker,
lsp = { lsp = {
config = {
filetypes = { "markdown", "quarto", "djot" },
},
auto_attach = { auto_attach = {
enabled = true, enabled = true,
filteypes = { "markdown", "quarto", "djot" },
}, },
}, },
}) })

View file

@ -104,7 +104,7 @@ return {
}, },
}, },
-- TODO: needs to pick up poetry env for python, -- TODO: needs to pick up poetry env for python,
-- currently just hard-codes running through uv -- currently just hard-codes running through poetry
{ {
"andythigpen/nvim-coverage", "andythigpen/nvim-coverage",
dependencies = { dependencies = {
@ -112,7 +112,7 @@ return {
}, },
config = function() config = function()
require("coverage").setup({ require("coverage").setup({
lang = { python = { coverage_command = "uv run coverage json -q -o -" } }, lang = { python = { coverage_command = "poetry run coverage json -q -o -" } },
}) })
end, end,
ft = { "python" }, ft = { "python" },

View file

@ -24,9 +24,6 @@ if file_exists(colorsfile) == true then
end end
local settings = { local settings = {
unix_domains = {
{ name = "unix" },
},
enable_wayland = true, -- sadface :-( enable_wayland = true, -- sadface :-(
xcursor_theme = "Adwaita", xcursor_theme = "Adwaita",
enable_tab_bar = true, enable_tab_bar = true,

View file

@ -18,10 +18,6 @@ pager = "delta"
[ui.diff] [ui.diff]
format = "git" # for the time being to use delta well format = "git" # for the time being to use delta well
[aliases]
# see: https://shaddy.dev/notes/jj-tug/, update most recent bookmark
tug = ["bookmark", "move", "--from", "heads(::@- & bookmarks())", "--to", "@-"]
[templates] [templates]
# Add git diffs to commit drafts # Add git diffs to commit drafts
draft_commit_description = ''' draft_commit_description = '''
@ -50,6 +46,7 @@ if(root,
if(conflict, label("conflict", "conflict")), if(conflict, label("conflict", "conflict")),
bookmarks, bookmarks,
tags, tags,
if(git_head, label("git_head", "git_head()")),
if(description, if(description,
description.first_line(), description.first_line(),
label(if(empty, "empty"), description_placeholder), label(if(empty, "empty"), description_placeholder),
@ -61,7 +58,6 @@ if(root,
if(config("ui.show-cryptographic-signatures").as_boolean(), if(config("ui.show-cryptographic-signatures").as_boolean(),
format_short_cryptographic_signature(signature)), format_short_cryptographic_signature(signature)),
if(empty, label("empty", "(empty)")), if(empty, label("empty", "(empty)")),
if(git_head, label("git_head", "git_head()")),
) ++ "\n", ) ++ "\n",
), ),
) )

View file

@ -1,6 +1,6 @@
[settings] [settings]
default-library = main default-library = main
formatter = bbt formater = bbt
local-config-file = .papis.config local-config-file = .papis.config
opentool = sioyek opentool = sioyek