154 lines
3.5 KiB
Lua
154 lines
3.5 KiB
Lua
local vim = vim
|
|
return {
|
|
{
|
|
"stevearc/conform.nvim",
|
|
-- event = 'BufWritePre', -- uncomment for format on save
|
|
opts = require "configs.conform",
|
|
event = { "BufReadPre", "BufNewFile" },
|
|
},
|
|
|
|
-- These are some examples, uncomment them if you want to see them work!
|
|
{
|
|
"neovim/nvim-lspconfig",
|
|
config = function()
|
|
require "configs.lspconfig"
|
|
end,
|
|
},
|
|
|
|
{
|
|
"mfussenegger/nvim-lint",
|
|
lazy = true,
|
|
event = { "BufReadPre", "BufNewFile" },
|
|
config = function()
|
|
local lint = require "lint"
|
|
|
|
lint.linters_by_ft = {
|
|
python = { "ruff" },
|
|
yaml = { "yamllint" },
|
|
lua = { "selene" },
|
|
}
|
|
|
|
local ns = lint.get_namespace "ruff"
|
|
vim.diagnostic.config({ virtual_text = false, underline = false }, ns)
|
|
|
|
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
|
|
|
|
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
|
group = lint_augroup,
|
|
callback = function()
|
|
lint.try_lint()
|
|
end,
|
|
})
|
|
|
|
vim.keymap.set("n", "<leader>ld", function()
|
|
lint.try_lint()
|
|
end, { desc = "Trigger linting for current file" })
|
|
end,
|
|
},
|
|
|
|
-- {
|
|
-- "nvim-treesitter/nvim-treesitter",
|
|
-- opts = {
|
|
-- ensure_installed = {
|
|
-- "vim", "lua", "vimdoc",
|
|
-- "html", "css"
|
|
-- },
|
|
-- },
|
|
-- },
|
|
{
|
|
"rktjmp/paperplanes.nvim",
|
|
opts = {
|
|
provider = "dpaste.org",
|
|
},
|
|
|
|
{
|
|
"folke/persistence.nvim",
|
|
event = "BufReadPre", -- this will only start session saving when an actual file was opened
|
|
opts = {
|
|
-- add any custom options here
|
|
}
|
|
} },
|
|
|
|
{
|
|
"NvChad/nvcommunity",
|
|
{ import = "nvcommunity.git.diffview" },
|
|
{ import = "nvcommunity.git.lazygit" },
|
|
{ import = "nvcommunity.completion.copilot" },
|
|
{
|
|
"copilot.lua",
|
|
cmd = "Copilot",
|
|
event = "InsertEnter",
|
|
config = function()
|
|
require("copilot").setup({
|
|
suggestion = {
|
|
enabled = true,
|
|
auto_trigger = false,
|
|
hide_during_completion = true,
|
|
debounce = 75,
|
|
keymap = {
|
|
accept = "<M-a>",
|
|
accept_word = false,
|
|
accept_line = false,
|
|
next = "<M-n>",
|
|
prev = "<M-p>",
|
|
dismiss = "<M-d>",
|
|
},
|
|
},
|
|
})
|
|
end,
|
|
},
|
|
},
|
|
|
|
{
|
|
"folke/trouble.nvim",
|
|
opts = {}, -- for default options, refer to the configuration section for custom setup.
|
|
cmd = "Trouble",
|
|
keys = {
|
|
{
|
|
"<leader>tx",
|
|
"<cmd>Trouble diagnostics toggle<cr>",
|
|
desc = "Diagnostics (Trouble)",
|
|
},
|
|
{
|
|
"<leader>tX",
|
|
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
|
|
desc = "Buffer Diagnostics (Trouble)",
|
|
},
|
|
{
|
|
"<leader>cs",
|
|
"<cmd>Trouble symbols toggle focus=false<cr>",
|
|
desc = "Symbols (Trouble)",
|
|
},
|
|
{
|
|
"<leader>cl",
|
|
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
|
|
desc = "LSP Definitions / references / ... (Trouble)",
|
|
},
|
|
{
|
|
"<leader>tL",
|
|
"<cmd>Trouble loclist toggle<cr>",
|
|
desc = "Location List (Trouble)",
|
|
},
|
|
{
|
|
"<leader>tQ",
|
|
"<cmd>Trouble qflist toggle<cr>",
|
|
desc = "Quickfix List (Trouble)",
|
|
},
|
|
},
|
|
},
|
|
|
|
{
|
|
"tpope/vim-surround",
|
|
lazy = false,
|
|
},
|
|
|
|
-- Install a plugin
|
|
{
|
|
"max397574/better-escape.nvim",
|
|
event = "InsertEnter",
|
|
config = function()
|
|
require("better_escape").setup()
|
|
end,
|
|
},
|
|
}
|