HELLO NvChad
This commit is contained in:
146
lua/custom/plugins.lua
Normal file
146
lua/custom/plugins.lua
Normal file
@@ -0,0 +1,146 @@
|
||||
local overrides = require "custom.configs.overrides"
|
||||
|
||||
---@type NvPluginSpec[]
|
||||
local plugins = {
|
||||
|
||||
-- Override plugin definition options
|
||||
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
-- format & linting
|
||||
{
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
config = function()
|
||||
require "custom.configs.null-ls"
|
||||
end,
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require "plugins.configs.lspconfig"
|
||||
require "custom.configs.lspconfig"
|
||||
end, -- Override to setup mason-lspconfig
|
||||
},
|
||||
|
||||
-- override plugin configs
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = vim.tbl_deep_extend("force", overrides.mason, {
|
||||
ensure_installed = {
|
||||
"rust-analyzer",
|
||||
},
|
||||
}),
|
||||
},
|
||||
|
||||
{
|
||||
"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,
|
||||
},
|
||||
|
||||
{ "tpope/vim-surround", lazy = false },
|
||||
|
||||
-- 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
|
||||
Reference in New Issue
Block a user