275 lines
7.1 KiB
Lua
275 lines
7.1 KiB
Lua
local overrides = require "custom.configs.overrides"
|
|
|
|
---@type NvPluginSpec[]
|
|
local plugins = {
|
|
|
|
-- Override plugin definition options
|
|
|
|
{
|
|
"nvimtools/none-ls.nvim",
|
|
lazy = false,
|
|
config = function()
|
|
require "custom.configs.none-ls"
|
|
end,
|
|
},
|
|
|
|
|
|
{
|
|
"neovim/nvim-lspconfig",
|
|
dependencies = "nvimtools/none-ls.nvim",
|
|
config = function()
|
|
require "plugins.configs.lspconfig"
|
|
require "custom.configs.lspconfig"
|
|
end, -- Override to setup mason-lspconfig
|
|
},
|
|
|
|
-- override plugin configs
|
|
{
|
|
"NvChad/nvterm",
|
|
opts = function()
|
|
return require "custom.configs.nvterm"
|
|
end,
|
|
},
|
|
|
|
{
|
|
"williamboman/mason.nvim",
|
|
opts = vim.tbl_deep_extend("force", overrides.mason, {
|
|
ensure_installed = {
|
|
"rust-analyzer",
|
|
"gopls",
|
|
},
|
|
}),
|
|
},
|
|
|
|
-- {
|
|
-- "nvim-treesitter/nvim-treesitter",
|
|
-- opts = overrides.treesitter,
|
|
-- },
|
|
|
|
{
|
|
"nvim-tree/nvim-tree.lua",
|
|
opts = overrides.nvimtree,
|
|
},
|
|
|
|
-- Install a plugin
|
|
{
|
|
"max397574/better-escape.nvim",
|
|
event = "InsertEnter",
|
|
config = function()
|
|
require("better_escape").setup()
|
|
end,
|
|
},
|
|
|
|
{
|
|
"elixir-tools/elixir-tools.nvim",
|
|
version = "*",
|
|
event = { "BufReadPre", "BufNewFile" },
|
|
config = function()
|
|
local elixir = require "elixir"
|
|
local elixirls = require "elixir.elixirls"
|
|
|
|
elixir.setup {
|
|
nextls = { enable = true },
|
|
credo = {},
|
|
elixirls = {
|
|
enable = true,
|
|
settings = elixirls.settings {
|
|
dialyzerEnabled = false,
|
|
enableTestLenses = false,
|
|
},
|
|
on_attach = function(client, bufnr)
|
|
vim.keymap.set("n", "<space>fp", ":ElixirFromPipe<cr>", { buffer = true, noremap = true })
|
|
vim.keymap.set("n", "<space>tp", ":ElixirToPipe<cr>", { buffer = true, noremap = true })
|
|
vim.keymap.set("v", "<space>em", ":ElixirExpandMacro<cr>", { buffer = true, noremap = true })
|
|
end,
|
|
},
|
|
}
|
|
end,
|
|
dependencies = {
|
|
"nvim-lua/plenary.nvim",
|
|
},
|
|
},
|
|
|
|
{
|
|
"rust-lang/rust.vim",
|
|
ft = "rust",
|
|
init = function()
|
|
vim.g.rustfmt_autosave = 1
|
|
end,
|
|
},
|
|
|
|
{
|
|
"mrcjkb/rustaceanvim",
|
|
version = "^3",
|
|
ft = { "rust" },
|
|
-- dependencies = "neovim/nvim-lspconfig",
|
|
-- opts = function()
|
|
-- return require "custom.configs.rust-tools"
|
|
-- end,
|
|
-- config = function(, opts)
|
|
-- require('rust-tools').setup(opts)
|
|
-- end
|
|
},
|
|
|
|
-- {
|
|
-- "mfussenegger/nvim-dap",
|
|
-- },
|
|
|
|
{
|
|
"saecki/crates.nvim",
|
|
dependencies = "hrsh7th/nvim-cmp",
|
|
ft = { "rust", "toml" },
|
|
config = function(_, opts)
|
|
local crates = require "crates"
|
|
crates.setup(opts)
|
|
crates.show()
|
|
end,
|
|
},
|
|
|
|
{
|
|
"hrsh7th/nvim-cmp",
|
|
opts = function()
|
|
local M = require "plugins.configs.cmp"
|
|
table.insert(M.sources, { name = "cartes" })
|
|
return M
|
|
end,
|
|
},
|
|
|
|
{
|
|
"nvim-treesitter/nvim-treesitter-context",
|
|
lazy = false,
|
|
opts = { max_lines = 6 },
|
|
},
|
|
|
|
{ "tpope/vim-surround", lazy = false },
|
|
|
|
{ "famiu/bufdelete.nvim", lazy = false },
|
|
|
|
{ "fladson/vim-kitty", ft = { "kitty" } },
|
|
|
|
-- { "tpope/vim-fugitive", lazy = false },
|
|
|
|
{
|
|
"lewis6991/gitsigns.nvim",
|
|
config = function(_, opts)
|
|
require("gitsigns").setup(opts)
|
|
end,
|
|
},
|
|
|
|
{
|
|
"lukas-reineke/indent-blankline.nvim",
|
|
enabled = false,
|
|
},
|
|
|
|
{ "rouge8/neotest-rust" },
|
|
{ "jfpedroza/neotest-elixir" },
|
|
{ "lewis6991/fileline.nvim", lazy = false },
|
|
|
|
{
|
|
"nvim-neotest/neotest",
|
|
lazy = false,
|
|
dependencies = {
|
|
"nvim-neotest/nvim-nio",
|
|
"nvim-lua/plenary.nvim",
|
|
"antoinemadec/FixCursorHold.nvim",
|
|
"nvim-treesitter/nvim-treesitter",
|
|
},
|
|
config = function()
|
|
require("neotest").setup {
|
|
adapters = {
|
|
require "neotest-rust",
|
|
require "neotest-elixir" {
|
|
-- -- The Mix task to use to run the tests
|
|
-- -- Can be a function to return a dynamic value.
|
|
-- -- Default: "test"
|
|
-- mix_task = { "my_custom_task" },
|
|
-- -- Other formatters to pass to the test command as the formatters are overridden
|
|
-- -- Can be a function to return a dynamic value.
|
|
-- -- Default: {"ExUnit.CLIFormatter"}
|
|
-- extra_formatters = { "ExUnit.CLIFormatter", "ExUnitNotifier" },
|
|
-- -- Extra test block identifiers
|
|
-- -- Can be a function to return a dynamic value.
|
|
-- -- Block identifiers "test", "feature" and "property" are always supported by default.
|
|
-- -- Default: {}
|
|
-- extra_block_identifiers = { "test_with_mock" },
|
|
-- -- Extra arguments to pass to mix test
|
|
-- -- Can be a function that receives the position, to return a dynamic value
|
|
-- -- Default: {}
|
|
-- args = { "--trace" },
|
|
-- -- Command wrapper
|
|
-- -- Must be a function that receives the mix command as a table, to return a dynamic value
|
|
-- -- Default: function(cmd) return cmd end
|
|
-- post_process_command = function(cmd)
|
|
-- return vim.tbl_flatten { { "env", "FOO=bar" }, cmd }
|
|
-- end,
|
|
-- -- Delays writes so that results are updated at most every given milliseconds
|
|
-- -- Decreasing this number improves snappiness at the cost of performance
|
|
-- -- Can be a function to return a dynamic value.
|
|
-- -- Default: 1000
|
|
-- write_delay = 1000,
|
|
},
|
|
},
|
|
}
|
|
end,
|
|
},
|
|
|
|
{
|
|
"ray-x/go.nvim",
|
|
dependencies = { -- optional packages
|
|
"ray-x/guihua.lua",
|
|
"neovim/nvim-lspconfig",
|
|
"nvim-treesitter/nvim-treesitter",
|
|
},
|
|
config = function()
|
|
require("go").setup()
|
|
end,
|
|
event = { "CmdlineEnter" },
|
|
ft = { "go", "gomod" },
|
|
build = ':lua require("go.install").update_all_sync()', -- if you need to install/update all binaries
|
|
},
|
|
|
|
{
|
|
"stevearc/conform.nvim",
|
|
config = function()
|
|
require("conform").setup {
|
|
formatters_by_ft = {
|
|
lua = { "stylua" },
|
|
-- Conform will run multiple formatters sequentially
|
|
python = { "isort", "black" },
|
|
-- You can customize some of the format options for the filetype (:help conform.format)
|
|
rust = { "rustfmt", lsp_format = "fallback" },
|
|
-- Conform will run the first available formatter
|
|
javascript = { "prettierd", "prettier", stop_after_first = true },
|
|
go = { { "gofmt" } },
|
|
},
|
|
}
|
|
end,
|
|
},
|
|
|
|
-- {
|
|
-- "rouge8/neotest-rust",
|
|
-- config = function() end,
|
|
-- },
|
|
--
|
|
-- {
|
|
-- "jfpedroza/neotest-elixir",
|
|
-- config = function() end,
|
|
-- },
|
|
|
|
-- To make a plugin not be loaded
|
|
-- {
|
|
-- "NvChad/nvim-colorizer.lua",
|
|
-- enabled = false
|
|
-- },
|
|
|
|
-- All NvChad plugins are lazy-loaded by default
|
|
-- For a plugin to be loaded, you will need to set either `ft`, `cmd`, `keys`, `event`, or set `lazy = false`
|
|
-- If you want a plugin to load on startup, add `lazy = false` to a plugin spec, for example
|
|
-- {
|
|
-- "mg979/vim-visual-multi",
|
|
-- lazy = false,
|
|
-- }
|
|
}
|
|
|
|
return plugins
|