Reworked config using chezmoi

This commit is contained in:
2026-01-13 15:01:43 +01:00
parent 2b6d3acf40
commit 7f21933475
64 changed files with 177 additions and 285 deletions

View File

@@ -0,0 +1,20 @@
return {
"aznhe21/actions-preview.nvim",
opts = {
backend = { "telescope", "nui" },
telescope = vim.tbl_extend(
"force",
-- telescope theme: https://github.com/nvim-telescope/telescope.nvim#themes
require("telescope.themes").get_cursor(),
{
make_value = nil,
make_make_display = nil,
previewer = false,
layout_config = {
width = 0.3,
height = 0.15,
},
}
),
}
};

View File

@@ -0,0 +1,19 @@
return {
"saecki/crates.nvim",
event = { "BufRead Cargo.toml" },
opts = {
lsp = {
enabled = true,
actions = true,
completion = true,
hover = true,
},
completion = {
crates = {
enabled = true,
max_results = 10,
min_chars = 3,
},
}
}
}

View File

@@ -0,0 +1,9 @@
return {
"chrisgrieser/nvim-lsp-endhints",
event = "LspAttach",
opts = {
icons = {
type = "󱈤 ",
},
},
}

View File

@@ -0,0 +1,12 @@
return {
"3rd/image.nvim",
config = function()
require("image").setup {
backend = "ueberzug",
}
package.path = package.path .. ";" .. vim.fn.expand "$HOME" .. "/.luarocks/share/lua/5.1/?/init.lua"
package.path = package.path .. ";" .. vim.fn.expand "$HOME" .. "/.luarocks/share/lua/5.1/?.lua"
end,
ft = { "markdown" },
event = { "BufRead *.png", "BufRead *.jpg", "BufRead *.jpeg", "BufRead *.gif", "BufRead *.wepb", "BufRead *.avif" },
}

View File

@@ -0,0 +1,29 @@
return {
{
"stevearc/conform.nvim",
opts = require "configs.conform",
},
{
"neovim/nvim-lspconfig",
opts = require "configs.lspconfig"
},
{
"Pocco81/auto-save.nvim",
opts = {},
event = { "InsertEnter" },
},
{
"nvim-treesitter/nvim-treesitter",
opts = require "configs.default-ts",
},
{
"hiphish/rainbow-delimiters.nvim",
},
{
"nvim-tree/nvim-tree.lua",
opts = require "configs.nvim-tree",
},
{
"hrsh7th/nvim-cmp",
},
}

View File

@@ -0,0 +1,25 @@
return {
"mfussenegger/nvim-jdtls",
ft = { "java" },
config = function()
local cmd = vim.lsp.config["jdtls"].cmd
local lombok = vim.fn.stdpath('data') .. '/mason/packages/jdtls/lombok.jar'
table.insert(cmd, string.format("--jvm-arg=-javaagent:%s", lombok))
local opts = {
cmd = cmd,
root_dir = require("jdtls.setup").find_root({ ".git", "mvnw", "gradlew" }),
on_attach = function(client, _)
client.server_capabilities.semanticTokensProvider = nil
end,
}
vim.api.nvim_create_autocmd("Filetype", {
pattern = "java",
callback = function()
require("jdtls").start_or_attach(opts)
end,
})
end,
}

View File

@@ -0,0 +1,20 @@
return {
"mfussenegger/nvim-lint",
event = { "BufReadPre", "BufNewFile" },
config = function()
local lint = require("lint")
lint.linters_by_ft = {
solidity = {'solhint'},
["*"] = { "codespell" },
}
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost" }, {
group = vim.api.nvim_create_augroup("RunLinter", { clear = true }),
callback = function()
lint.try_lint()
lint.try_lint("codespell")
end,
})
end,
}

View File

@@ -0,0 +1,9 @@
return {
"iamcco/markdown-preview.nvim",
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
build = "cd app && yarn install",
init = function()
vim.g.mkdp_filetypes = { "markdown" }
end,
ft = { "markdown" },
}

View File

@@ -0,0 +1,5 @@
return {
"WhoIsSethDaniel/mason-tool-installer.nvim",
lazy = false,
opts = require "configs.default-lsp"
}

View File

@@ -0,0 +1,25 @@
return {
"folke/noice.nvim",
event = "VeryLazy",
opts = {
lsp = {
progress = {
enabled = false
},
signature = {
enabled = false
},
hover = {
enabled = false
},
},
presets = {
bottom_search = true, -- use a classic bottom cmdline for search
long_message_to_split = true, -- long messages will be sent to a split
},
},
dependencies = {
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
}
}

View File

@@ -0,0 +1,9 @@
return {
"masterj122517/project.nvim",
lazy = false,
config = function()
require("telescope").load_extension "projects"
require("project_nvim").setup {
}
end,
}

View File

@@ -0,0 +1,31 @@
return {
"mrcjkb/rustaceanvim",
lazy = false, -- This plugin is already lazy
config = function()
vim.g.rustaceanvim = {
server = {
on_attach = function(_, _)
local map = vim.keymap.set
map({ "n", "v" }, "<leader>la", "<CMD>RustLsp codeAction<CR>", { desc = "Code action" })
end,
default_settings = {
["rust-analyzer"] = {
-- cargo = {
-- allFeatures = true,
-- },
inlayHints = {
parameterHints = {
enable = false,
},
},
},
},
},
tools = {
float_win_config = {
border = "rounded",
},
},
}
end,
}

View File

@@ -0,0 +1,24 @@
return {
'nvim-telescope/telescope.nvim',
opts = {
defaults = {
vimgrep_arguments = {
"rg",
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
"--smart-case",
"--hidden","--glob",
"!**/.git/*"
},
},
pickers = {
find_files = {
-- `hidden = true` will still show the inside of `.git/` as it's not `.gitignore`d.
find_command = { "rg", "--files", "--hidden", "--glob", "!**/.git/*" },
},
}
}
}

View File

@@ -0,0 +1,10 @@
return {
"kevinhwang91/nvim-ufo",
opts = {
provider_selector = function(_, _, _)
return { "treesitter", "indent" }
end,
},
lazy = false,
dependencies = { "kevinhwang91/promise-async" },
}

View File

@@ -0,0 +1,21 @@
vim.api.nvim_create_autocmd('BufEnter', {
pattern = '*.py',
callback = function()
local venv = vim.fn.finddir('.venv', vim.fn.getcwd() .. ';')
if venv ~= '' then
require('venv-selector').retrieve_from_cache()
end
end,
once = true,
})
return {
'linux-cultist/venv-selector.nvim',
opts = {
name = ".venv",
},
event = 'VeryLazy',
keys = {
{ '<leader>vs', '<cmd>VenvSelect<cr>' },
},
}