Reworked config using chezmoi
This commit is contained in:
20
dot_config/nvim/lua/plugins/action-preview.lua
Normal file
20
dot_config/nvim/lua/plugins/action-preview.lua
Normal 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,
|
||||
},
|
||||
}
|
||||
),
|
||||
}
|
||||
};
|
||||
19
dot_config/nvim/lua/plugins/crates.lua
Normal file
19
dot_config/nvim/lua/plugins/crates.lua
Normal 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,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
9
dot_config/nvim/lua/plugins/endhints.lua
Normal file
9
dot_config/nvim/lua/plugins/endhints.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
"chrisgrieser/nvim-lsp-endhints",
|
||||
event = "LspAttach",
|
||||
opts = {
|
||||
icons = {
|
||||
type = " ",
|
||||
},
|
||||
},
|
||||
}
|
||||
12
dot_config/nvim/lua/plugins/image.lua
Normal file
12
dot_config/nvim/lua/plugins/image.lua
Normal 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" },
|
||||
}
|
||||
29
dot_config/nvim/lua/plugins/init.lua
Normal file
29
dot_config/nvim/lua/plugins/init.lua
Normal 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",
|
||||
},
|
||||
}
|
||||
25
dot_config/nvim/lua/plugins/jdtls.lua
Normal file
25
dot_config/nvim/lua/plugins/jdtls.lua
Normal 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,
|
||||
}
|
||||
20
dot_config/nvim/lua/plugins/lint.lua
Normal file
20
dot_config/nvim/lua/plugins/lint.lua
Normal 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,
|
||||
}
|
||||
|
||||
9
dot_config/nvim/lua/plugins/markpreview.lua
Normal file
9
dot_config/nvim/lua/plugins/markpreview.lua
Normal 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" },
|
||||
}
|
||||
5
dot_config/nvim/lua/plugins/mason-tool-installer.lua
Normal file
5
dot_config/nvim/lua/plugins/mason-tool-installer.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
lazy = false,
|
||||
opts = require "configs.default-lsp"
|
||||
}
|
||||
25
dot_config/nvim/lua/plugins/noice.lua
Normal file
25
dot_config/nvim/lua/plugins/noice.lua
Normal 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",
|
||||
}
|
||||
}
|
||||
9
dot_config/nvim/lua/plugins/project.lua
Normal file
9
dot_config/nvim/lua/plugins/project.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
"masterj122517/project.nvim",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("telescope").load_extension "projects"
|
||||
require("project_nvim").setup {
|
||||
}
|
||||
end,
|
||||
}
|
||||
31
dot_config/nvim/lua/plugins/rustaceanvim.lua
Normal file
31
dot_config/nvim/lua/plugins/rustaceanvim.lua
Normal 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,
|
||||
}
|
||||
24
dot_config/nvim/lua/plugins/telescope.lua
Normal file
24
dot_config/nvim/lua/plugins/telescope.lua
Normal 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/*" },
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
10
dot_config/nvim/lua/plugins/ufo.lua
Normal file
10
dot_config/nvim/lua/plugins/ufo.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
return {
|
||||
"kevinhwang91/nvim-ufo",
|
||||
opts = {
|
||||
provider_selector = function(_, _, _)
|
||||
return { "treesitter", "indent" }
|
||||
end,
|
||||
},
|
||||
lazy = false,
|
||||
dependencies = { "kevinhwang91/promise-async" },
|
||||
}
|
||||
21
dot_config/nvim/lua/plugins/venv.lua
Normal file
21
dot_config/nvim/lua/plugins/venv.lua
Normal 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>' },
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user