mirror of
https://github.com/kristoferssolo/SoloVim.git
synced 2026-02-04 06:42:05 +00:00
Update 2024-08-21
This commit is contained in:
@@ -13,7 +13,6 @@ return {
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
event = { "BufRead pyproject.toml" },
|
||||
},
|
||||
{ "kristijanhusak/vim-dadbod-completion", dependencies = { "tpope/vim-dadbod" } },
|
||||
"SergioRibera/cmp-dotenv",
|
||||
"L3MON4D3/LuaSnip",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
@@ -21,10 +20,22 @@ return {
|
||||
"Exafunction/codeium.nvim",
|
||||
"petertriho/cmp-git",
|
||||
"davidsierradz/cmp-conventionalcommits",
|
||||
"zjp-CN/nvim-cmp-lsp-rs",
|
||||
{
|
||||
"MattiasMTS/cmp-dbee",
|
||||
dependencies = {
|
||||
{ "kndndrj/nvim-dbee" },
|
||||
},
|
||||
ft = { "sql", "mysql", "plsql" },
|
||||
opts = {},
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
opts = function(_, opts)
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
local cmp_lsp_rs = require("cmp_lsp_rs")
|
||||
local comparators = cmp_lsp_rs.comparators
|
||||
local compare = require("cmp").config.compare
|
||||
local kind_icons = {
|
||||
Text = "",
|
||||
Method = "",
|
||||
@@ -54,8 +65,7 @@ return {
|
||||
Copilot = "",
|
||||
Codeium = "",
|
||||
}
|
||||
|
||||
cmp.setup({
|
||||
opts = {
|
||||
mapping = {
|
||||
["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
@@ -75,11 +85,11 @@ return {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "crates" },
|
||||
{ name = "async_path" },
|
||||
{ name = "cmp-dbee" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "buffer", keyword_length = 4 },
|
||||
{ name = "neorg" },
|
||||
{ name = "pypi" },
|
||||
{ name = "vim-dadbod-completion" },
|
||||
{ name = "env" },
|
||||
{ name = "calc" },
|
||||
{ name = "codeium" },
|
||||
@@ -107,15 +117,14 @@ return {
|
||||
neorg = "[neorg]",
|
||||
crates = "[crates]",
|
||||
pypi = "[pypi]",
|
||||
vim_dadbod_completion = "[DB]",
|
||||
env = "[env]",
|
||||
buffer = "[buf]",
|
||||
["cmp-dbee"] = "[DB]",
|
||||
})[entry.source.name]
|
||||
return vim_item
|
||||
end,
|
||||
expandable_indicator = true,
|
||||
},
|
||||
|
||||
experimental = {
|
||||
ghost_text = true,
|
||||
},
|
||||
@@ -127,6 +136,22 @@ return {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = false,
|
||||
},
|
||||
})
|
||||
sorting = {
|
||||
comparators = {
|
||||
compare.exact,
|
||||
compare.score,
|
||||
-- comparators.inherent_import_inscope,
|
||||
comparators.inscope_inherent_import,
|
||||
comparators.sort_by_label_but_underscore_last,
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, source in ipairs(opts.sources) do
|
||||
cmp_lsp_rs.filter_out.entry_filter(source)
|
||||
end
|
||||
return opts
|
||||
end,
|
||||
config = function(_, opts)
|
||||
require("cmp").setup(opts)
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ return {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"hrsh7th/nvim-cmp",
|
||||
},
|
||||
commit = "d3b88eb3aa1de6da33d325c196b8a41da2bcc825",
|
||||
cmd = { "Codeium" },
|
||||
opts = {
|
||||
enable_chat = true,
|
||||
|
||||
@@ -27,6 +27,8 @@ return {
|
||||
{ "savq/melange-nvim", name = "melange.nvim" },
|
||||
{ "ellisonleao/gruvbox.nvim" },
|
||||
{ "bluz71/vim-nightfly-colors", name = "nightfly.nvim" },
|
||||
{ "0xstepit/flow.nvim" },
|
||||
{ "Aliqyan-21/darkvoid.nvim" },
|
||||
{
|
||||
"rose-pine/neovim",
|
||||
name = "rose-pine.nvim",
|
||||
|
||||
@@ -25,7 +25,7 @@ return {
|
||||
vimwiki = { "cbfmt", "markdownlint", "markdown-toc" },
|
||||
json = { "jq" },
|
||||
c = { "clang-format" },
|
||||
toml = { "taplo" },
|
||||
-- toml = { "taplo" },
|
||||
cpp = { "clang-format" },
|
||||
cmake = { "cmake_format" },
|
||||
htmldjango = { "djlint", "rustywind" },
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
return {
|
||||
"kristijanhusak/vim-dadbod-ui",
|
||||
dependencies = {
|
||||
{ "tpope/vim-dotenv" },
|
||||
{ "tpope/vim-dadbod", lazy = true },
|
||||
{ "kristijanhusak/vim-dadbod-completion", ft = { "sql", "mysql", "plsql" }, lazy = true },
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>od", vim.cmd.DBUIToggle, desc = "Toggle [D]adbod UI" },
|
||||
},
|
||||
cmd = {
|
||||
"DBUI",
|
||||
"DBUIToggle",
|
||||
"DBUIAddConnection",
|
||||
"DBUIFindBuffer",
|
||||
},
|
||||
}
|
||||
@@ -194,7 +194,7 @@ return {
|
||||
dapui.setup()
|
||||
require("mason-nvim-dap").setup({
|
||||
ensure_installed = {
|
||||
"python",
|
||||
"firefox-debug-adapter",
|
||||
},
|
||||
automatic_install = true,
|
||||
})
|
||||
@@ -202,17 +202,37 @@ return {
|
||||
require("nvim-dap-virtual-text").setup({})
|
||||
|
||||
-- Python
|
||||
local debugpy = mason_registry.get_package("debugpy")
|
||||
local debugpy_path = debugpy:get_install_path() .. "/venv/bin/python"
|
||||
require("dap-python").setup(debugpy_path)
|
||||
require("dap-python").setup("python")
|
||||
|
||||
-- JS/TS
|
||||
local firefox_debug_adapter = mason_registry.get_package("firefox-debug-adapter"):get_install_path()
|
||||
.. "/dist/adapter.bundle.js"
|
||||
dap.adapters.firefox = {
|
||||
type = "executable",
|
||||
command = "bun",
|
||||
args = { firefox_debug_adapter },
|
||||
}
|
||||
dap.configurations.javascript = {
|
||||
{
|
||||
name = "Debug with Firefox",
|
||||
type = "firefox",
|
||||
request = "launch",
|
||||
reAttach = true,
|
||||
url = "http://localhost:3000",
|
||||
webRoot = "${workspaceFolder}",
|
||||
firefoxExecutable = "/usr/bin/floorp",
|
||||
},
|
||||
}
|
||||
dap.configurations.typescript = dap.configurations.javascript
|
||||
dap.configurations.typescriptreact = dap.configurations.javascript
|
||||
|
||||
-- C/C++
|
||||
dap.adapters.gdb = {
|
||||
type = "executable",
|
||||
command = "gdb",
|
||||
args = { "-i", "dap" },
|
||||
args = { "--interpreter=dap", "--eval-command", "set print pretty on" },
|
||||
}
|
||||
dap.configurations.cpp = {
|
||||
dap.configurations.c = {
|
||||
{
|
||||
name = "Launch",
|
||||
type = "gdb",
|
||||
@@ -223,7 +243,30 @@ return {
|
||||
cwd = "${workspaceFolder}",
|
||||
stopAtBeginningOfMainSubprogram = false,
|
||||
},
|
||||
{
|
||||
name = "Select and attach to process",
|
||||
type = "gdb",
|
||||
request = "attach",
|
||||
program = function()
|
||||
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
|
||||
end,
|
||||
pid = function()
|
||||
local name = vim.fn.input("Executable name (filter): ")
|
||||
return require("dap.utils").pick_process({ filter = name })
|
||||
end,
|
||||
cwd = "${workspaceFolder}",
|
||||
},
|
||||
{
|
||||
name = "Attach to gdbserver :1234",
|
||||
type = "gdb",
|
||||
request = "attach",
|
||||
target = "localhost:1234",
|
||||
program = function()
|
||||
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
|
||||
end,
|
||||
cwd = "${workspaceFolder}",
|
||||
},
|
||||
}
|
||||
dap.configurations.c = dap.configurations.cpp
|
||||
dap.configurations.cpp = dap.configurations.c
|
||||
end,
|
||||
}
|
||||
|
||||
19
lua/plugins/dbee.lua
Normal file
19
lua/plugins/dbee.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
return {
|
||||
"kndndrj/nvim-dbee",
|
||||
dependencies = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
cmd = "Dbee",
|
||||
build = function()
|
||||
-- Install tries to automatically detect the install method.
|
||||
-- if it fails, try calling it with one of these parameters:
|
||||
-- "curl", "wget", "bitsadmin", "go"
|
||||
require("dbee").install("curl")
|
||||
end,
|
||||
opts = {
|
||||
--- https://github.com/kndndrj/nvim-dbee/blob/master/lua/dbee/config.lua
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("dbee").setup(opts)
|
||||
end,
|
||||
}
|
||||
8
lua/plugins/demicolon.lua
Normal file
8
lua/plugins/demicolon.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
"mawkler/demicolon.nvim",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
},
|
||||
opts = {},
|
||||
}
|
||||
@@ -4,7 +4,7 @@ return {
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
aggressive_mode = false,
|
||||
excluded_lsp_clients = {},
|
||||
excluded_lsp_clients = { "rust_analyzer" },
|
||||
grace_period = 60 * 15,
|
||||
wakeup_delay = 0,
|
||||
},
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
return {
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
main = "ibl",
|
||||
version = "3.5.0",
|
||||
version = "*",
|
||||
opts = {
|
||||
enabled = true,
|
||||
indent = {
|
||||
smart_indent_cap = true,
|
||||
},
|
||||
@@ -27,6 +26,7 @@ return {
|
||||
"packer",
|
||||
"startify",
|
||||
"lspinfo",
|
||||
"dbee",
|
||||
},
|
||||
buftypes = {
|
||||
"terminal",
|
||||
|
||||
@@ -1,5 +1,22 @@
|
||||
return {
|
||||
"RRethy/vim-illuminate",
|
||||
event = "BufReadPost",
|
||||
keys = {
|
||||
{
|
||||
|
||||
"<A-n>",
|
||||
function()
|
||||
require("illuminate").goto_next_reference()
|
||||
end,
|
||||
},
|
||||
{
|
||||
|
||||
"<A-p>",
|
||||
function()
|
||||
require("illuminate").goto_prev_reference()
|
||||
end,
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("illuminate").configure({
|
||||
providers = {
|
||||
@@ -19,6 +36,7 @@ return {
|
||||
"NvimTree",
|
||||
"dirvish",
|
||||
"fugitive",
|
||||
"dbee",
|
||||
},
|
||||
-- filetypes_allowlist: filetypes to illuminate, this is overridden by filetypes_denylist
|
||||
filetypes_allowlist = {},
|
||||
@@ -48,11 +66,5 @@ return {
|
||||
-- min_count_to_highlight: minimum number of matches required to perform highlighting
|
||||
min_count_to_highlight = 1,
|
||||
})
|
||||
vim.keymap.set("n", "<A-n>", function()
|
||||
require("illuminate").goto_next_reference()
|
||||
end, { noremap = true })
|
||||
vim.keymap.set("n", "<A-p>", function()
|
||||
require("illuminate").goto_prev_reference()
|
||||
end, { noremap = true })
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -6,6 +6,59 @@ return {
|
||||
{ "nvim-neorg/neorg-telescope" },
|
||||
},
|
||||
cmd = { "Neorg" },
|
||||
keys = {
|
||||
{ "<C-Space>", "<Plug>(neorg.qol.todo-items.todo.task-cycle)", desc = "Cycle Todo Item", ft = { "norg" } },
|
||||
{
|
||||
"<LocalLeader>cm",
|
||||
"<Plug>(neorg.looking-glass.magnify-code-block)",
|
||||
desc = "Mignify Code Block",
|
||||
ft = { "norg" },
|
||||
},
|
||||
{ "<LocalLeader>id", "<Plug>(neorg.tempus.insert-date)", desc = "Insert Date", ft = { "norg" } },
|
||||
{ "<LocalLeader>li", "<Plug>(neorg.pivot.list.invert)", desc = "List invert", ft = { "norg" } },
|
||||
{ "<LocalLeader>lt", "<Plug>(neorg.pivot.list.toggle)", desc = "List Toggle", ft = { "norg" } },
|
||||
{ "<LocalLeader>nn", "<Plug>(neorg.dirman.new-note)", desc = "New Note", ft = { "norg" } },
|
||||
{
|
||||
"<LocalLeader>ta",
|
||||
"<Plug>(neorg.qol.todo-items.todo.task-ambiguous)",
|
||||
desc = "Task Ambiguous",
|
||||
ft = { "norg" },
|
||||
},
|
||||
{
|
||||
"<LocalLeader>tc",
|
||||
"<Plug>(neorg.qol.todo-items.todo.task-cancelled)",
|
||||
desc = "Task Cancelled",
|
||||
ft = { "norg" },
|
||||
},
|
||||
{ "<LocalLeader>td", "<Plug>(neorg.qol.todo-items.todo.task-done)", desc = "Task Done", ft = { "norg" } },
|
||||
{
|
||||
"<LocalLeader>th",
|
||||
"<Plug>(neorg.qol.todo-items.todo.task-on-hold)",
|
||||
desc = "Task on Hold",
|
||||
ft = { "norg" },
|
||||
},
|
||||
{
|
||||
"<LocalLeader>ti",
|
||||
"<Plug>(neorg.qol.todo-items.todo.task-important)",
|
||||
desc = "Task Important",
|
||||
ft = { "norg" },
|
||||
},
|
||||
{
|
||||
"<LocalLeader>tp",
|
||||
"<Plug>(neorg.qol.todo-items.todo.task-pending)",
|
||||
desc = "Task Pending",
|
||||
ft = { "norg" },
|
||||
},
|
||||
{
|
||||
"<LocalLeader>tr",
|
||||
"<Plug>(neorg.qol.todo-items.todo.task-recurring)",
|
||||
desc = "Task Recurring",
|
||||
ft = { "norg" },
|
||||
},
|
||||
{ "<LocalLeader>tu", "<Plug>(neorg.qol.todo-items.todo.task-undone)", desc = "Task Undone", ft = { "norg" } },
|
||||
{ ">", "<Plug>(neorg.promo.promote.range)", desc = "Promote Range", ft = { "norg" } },
|
||||
{ "<", "<Plug>(neorg.promo.demote.range)", desc = "Demote Range", ft = { "norg" } },
|
||||
},
|
||||
lazy = true,
|
||||
version = "*",
|
||||
ft = "norg",
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
return {
|
||||
"nvim-neotest/neotest",
|
||||
dependencies = {
|
||||
"nvim-neotest/nvim-nio",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"antoinemadec/FixCursorHold.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"nvim-neotest/neotest-python",
|
||||
"marilari88/neotest-vitest",
|
||||
"mrcjkb/rustaceanvim",
|
||||
"alfaix/neotest-gtest",
|
||||
},
|
||||
opts = {
|
||||
adapters = {
|
||||
["neotest-python"] = {},
|
||||
["neotest-vitest"] = {},
|
||||
["rustaceanvim.neotest"] = {},
|
||||
["neotest-gtest"] = {},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -27,12 +27,3 @@ return {
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
-- ◍ biome
|
||||
-- ◍ cmakelang
|
||||
-- ◍ cmakelint
|
||||
-- ◍ cpplint
|
||||
-- ◍ djlint
|
||||
-- ◍ jinja-lsp jinja_lsp
|
||||
-- ◍ markdownlint
|
||||
-- ◍ mypy
|
||||
|
||||
@@ -2,6 +2,7 @@ local ft = { "typescript", "typescriptreact", "javascript", "react", "python", "
|
||||
return {
|
||||
"piersolenski/telescope-import.nvim",
|
||||
dependencies = "nvim-telescope/telescope.nvim",
|
||||
commit = "e60ca0fea71432ed578e17d8f1b153da3fa4555d",
|
||||
ft = ft,
|
||||
keys = {
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ return {
|
||||
},
|
||||
opts = {
|
||||
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
||||
ensure_installed = { "cpp", "lua", "rust", "python", "markdown", "json", "http", "markdown_inline" }, -- one of "all" or a list of languages
|
||||
ensure_installed = { "cpp", "lua", "rust", "python", "markdown", "json", "http", "markdown_inline", "sql" }, -- one of "all" or a list of languages
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = false,
|
||||
-- Automatically install missing parsers when entering buffer
|
||||
|
||||
@@ -5,12 +5,12 @@ return {
|
||||
cmd = "Trouble",
|
||||
keys = {
|
||||
{
|
||||
"<leader>tt",
|
||||
"<leader>xx",
|
||||
"<cmd>Trouble diagnostics toggle<cr>",
|
||||
desc = "Toggle trouble",
|
||||
},
|
||||
{
|
||||
"<leader>td",
|
||||
"<leader>xd",
|
||||
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
|
||||
desc = "[D]ocument Diagnostics",
|
||||
},
|
||||
|
||||
@@ -25,7 +25,7 @@ return {
|
||||
{
|
||||
{ "<leader>C", vim.cmd.bdelete, desc = "[C]lose Buffer" },
|
||||
{ "<leader>c", group = "[C]url", { "<leader>cC", group = "[C]SV" } },
|
||||
{ "<leader>t", group = "[T]rouble" },
|
||||
{ "<leader>x", group = "Trouble" },
|
||||
{ "<leader>g", group = "[G]it" },
|
||||
{ "<leader>q", group = "Persistence" },
|
||||
{ "<leader>l", group = "[L]SP" },
|
||||
|
||||
Reference in New Issue
Block a user