feat: more editor plugins
parent
a266489958
commit
a38042d73e
@ -0,0 +1,33 @@
|
||||
local function check()
|
||||
vim.health.report_start()
|
||||
|
||||
if vim.fn.has 'nvim-0.8.0' == 1 then
|
||||
vim.health.report_ok 'Using Neovim >= 0.8.0'
|
||||
else
|
||||
vim.health.report_error 'Neovim >= 0.8.0 is required'
|
||||
end
|
||||
|
||||
for _, cmd in ipairs { 'git', 'rg', { 'fd', 'fdfind' }, 'lazygit' } do
|
||||
local name = type(cmd) == 'string' and cmd or vim.inspect(cmd)
|
||||
local commands = type(cmd) == 'string' and { cmd } or cmd
|
||||
---@cast commands string[]
|
||||
local found = false
|
||||
|
||||
for _, c in ipairs(commands) do
|
||||
if vim.fn.executable(c) == 1 then
|
||||
name = c
|
||||
found = true
|
||||
end
|
||||
end
|
||||
|
||||
if found then
|
||||
vim.health.report_ok(('`%s` is installed'):format(name))
|
||||
else
|
||||
vim.health.report_warn(('`%s` is not installed'):format(name))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
vim.api.nvim_create_user_command('Check', check, {})
|
||||
|
||||
return {}
|
@ -0,0 +1,3 @@
|
||||
return {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
}
|
@ -1,3 +1,12 @@
|
||||
return {
|
||||
"github/copilot.vim"
|
||||
}
|
||||
"zbirenbaum/copilot.lua",
|
||||
cmd = "Copilot",
|
||||
dependencies = {
|
||||
"github/copilot.vim"
|
||||
},
|
||||
build = ":Copilot auth",
|
||||
opts = {
|
||||
suggestion = { enabled = false },
|
||||
panel = { enabled = false },
|
||||
},
|
||||
}
|
||||
|
@ -0,0 +1,12 @@
|
||||
return {
|
||||
"ggandor/flit.nvim",
|
||||
keys = function()
|
||||
---@type LazyKeys[]
|
||||
local ret = {}
|
||||
for _, key in ipairs({ "f", "F", "t", "T" }) do
|
||||
ret[#ret + 1] = { key, mode = { "n", "x", "o" }, desc = key }
|
||||
end
|
||||
return ret
|
||||
end,
|
||||
opts = { labeled_modes = "nx" },
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
local function health()
|
||||
vim.health.report_start()
|
||||
|
||||
if vim.fn.has("nvim-0.8.0") == 1 then
|
||||
vim.health.report_ok("Using Neovim >= 0.8.0")
|
||||
else
|
||||
vim.health.report_error("Neovim >= 0.8.0 is required")
|
||||
end
|
||||
|
||||
for _, cmd in ipairs({ "git", "rg", { "fd", "fdfind" }, "lazygit" }) do
|
||||
local name = type(cmd) == "string" and cmd or vim.inspect(cmd)
|
||||
local commands = type(cmd) == "string" and { cmd } or cmd
|
||||
---@cast commands string[]
|
||||
local found = false
|
||||
|
||||
for _, c in ipairs(commands) do
|
||||
if vim.fn.executable(c) == 1 then
|
||||
name = c
|
||||
found = true
|
||||
end
|
||||
end
|
||||
|
||||
if found then
|
||||
vim.health.report_ok(("`%s` is installed"):format(name))
|
||||
else
|
||||
vim.health.report_warn(("`%s` is not installed"):format(name))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
vim.api.nvim_create_user_command("Health", health, {})
|
||||
|
||||
return {}
|
@ -0,0 +1,17 @@
|
||||
return {
|
||||
"ggandor/leap.nvim",
|
||||
keys = {
|
||||
{ "s", mode = { "n", "x", "o" }, desc = "Leap forward to" },
|
||||
{ "S", mode = { "n", "x", "o" }, desc = "Leap backward to" },
|
||||
{ "gs", mode = { "n", "x", "o" }, desc = "Leap from windows" },
|
||||
},
|
||||
config = function(_, opts)
|
||||
local leap = require("leap")
|
||||
for k, v in pairs(opts) do
|
||||
leap.opts[k] = v
|
||||
end
|
||||
leap.add_default_mappings(true)
|
||||
vim.keymap.del({ "x", "o" }, "x")
|
||||
vim.keymap.del({ "x", "o" }, "X")
|
||||
end,
|
||||
}
|
@ -0,0 +1 @@
|
||||
return { "folke/neoconf.nvim", cmd = "Neoconf", config = true }
|
@ -0,0 +1 @@
|
||||
return { "folke/neodev.nvim", opts = { experimental = { pathStrict = true } } }
|
@ -0,0 +1,18 @@
|
||||
return {
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = { "mason.nvim" },
|
||||
opts = function()
|
||||
local nls = require("null-ls")
|
||||
return {
|
||||
root_dir = require("null-ls.utils").root_pattern(".null-ls-root", ".neoconf.json", "Makefile", ".git"),
|
||||
sources = {
|
||||
nls.builtins.formatting.fish_indent,
|
||||
nls.builtins.diagnostics.fish,
|
||||
nls.builtins.formatting.stylua,
|
||||
nls.builtins.formatting.shfmt,
|
||||
nls.builtins.diagnostics.flake8,
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
return {
|
||||
"folke/todo-comments.nvim",
|
||||
cmd = { "TodoTrouble", "TodoTelescope" },
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
config = true,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
||||
{ "<leader>xt", "<cmd>TodoTrouble<cr>", desc = "Todo (Trouble)" },
|
||||
{ "<leader>xT", "<cmd>TodoTrouble keywords=TODO,FIX,FIXME<cr>", desc = "Todo/Fix/Fixme (Trouble)" },
|
||||
{ "<leader>st", "<cmd>TodoTelescope<cr>", desc = "Todo" },
|
||||
},
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
return {
|
||||
"folke/trouble.nvim",
|
||||
cmd = { "TroubleToggle", "Trouble" },
|
||||
opts = { use_diagnostic_signs = true },
|
||||
keys = {
|
||||
{ "<leader>xx", "<cmd>TroubleToggle document_diagnostics<cr>", desc = "Document Diagnostics (Trouble)" },
|
||||
{ "<leader>xX", "<cmd>TroubleToggle workspace_diagnostics<cr>", desc = "Workspace Diagnostics (Trouble)" },
|
||||
{ "<leader>xL", "<cmd>TroubleToggle loclist<cr>", desc = "Location List (Trouble)" },
|
||||
{ "<leader>xQ", "<cmd>TroubleToggle quickfix<cr>", desc = "Quickfix List (Trouble)" },
|
||||
{
|
||||
"[q",
|
||||
function()
|
||||
if require("trouble").is_open() then
|
||||
require("trouble").previous({ skip_groups = true, jump = true })
|
||||
else
|
||||
vim.cmd.cprev()
|
||||
end
|
||||
end,
|
||||
desc = "Previous trouble/quickfix item",
|
||||
},
|
||||
{
|
||||
"]q",
|
||||
function()
|
||||
if require("trouble").is_open() then
|
||||
require("trouble").next({ skip_groups = true, jump = true })
|
||||
else
|
||||
vim.cmd.cnext()
|
||||
end
|
||||
end,
|
||||
desc = "Next trouble/quickfix item",
|
||||
},
|
||||
},
|
||||
}
|
@ -0,0 +1 @@
|
||||
return { 'tpope/vim-repeat' }
|
@ -0,0 +1,7 @@
|
||||
return {
|
||||
'dstein64/vim-startuptime',
|
||||
cmd = 'StartupTime',
|
||||
config = function()
|
||||
vim.g.startuptime_tries = 10
|
||||
end,
|
||||
}
|
Loading…
Reference in New Issue