remove broken code

This commit is contained in:
2025-11-23 15:46:52 -06:00
parent 5badfd8361
commit 3ccd05a690
9 changed files with 131 additions and 303 deletions

View File

@@ -1,6 +1,5 @@
vim.cmd("let g:netrw_liststyle = 3")
local opt = vim.opt
opt.relativenumber = true
@@ -24,7 +23,7 @@ opt.background = "dark"
opt.signcolumn = "yes"
-- backspace
opt.backspace = "indent,eol,start" -- allow backspace on indent, end of line or insert mode start position
opt.backspace = "indent,eol,start" -- allow backspace on indent, end of line or insert mode start position
-- clipboard
opt.clipboard:append("unnamedplus") -- use system clipboard as default register

View File

@@ -1,123 +0,0 @@
return {
{
"mfussenegger/nvim-dap",
dependencies = {},
config = function()
local dap = require("dap")
dap.adapters.dart = {
type = "executable",
command = "flutter",
args = { "debug_adapter" },
}
require("nvim-dap-virtual-text").setup()
vim.keymap.set("n", "<leader>bb", dap.toggle_breakpoint, { desc = "Toggle breakpoint" })
vim.keymap.set("n", "<leader>b1", dap.continue, { desc = "Continue" })
vim.keymap.set("n", "<leader>b2", dap.step_into, { desc = "Step into" })
vim.keymap.set("n", "<leader>b3", dap.step_over, { desc = "Step over" })
vim.keymap.set("n", "<leader>b4", dap.step_out, { desc = "Step out" })
vim.keymap.set("n", "<leader>b5", dap.step_back, { desc = "Step back" })
vim.keymap.set("n", "<leader>b6", dap.restart, { desc = "Restart" })
dap.configurations.go = {}
end,
},
{
"rcarriga/nvim-dap-ui",
dependencies = {
"mfussenegger/nvim-dap",
"nvim-neotest/nvim-nio",
},
config = function()
local dap = require("dap")
local ui = require("dapui")
ui.setup()
dap.listeners.before.attach.dapui_config = function()
ui.open()
end
dap.listeners.before.launch.dapui_config = function()
ui.open()
end
vim.keymap.set("n", "<leader>be", function()
require("dapui").eval(nil, { enter = true })
end, { desc = "Evaluate variable under cursor" })
vim.keymap.set("n", "<leader>bq", function()
require("dap").terminate()
require("dapui").close()
end, { desc = "Quit DAP" })
end,
},
{
"theHamsta/nvim-dap-virtual-text",
dependencies = {
"mfussenegger/nvim-dap",
},
config = function()
require("nvim-dap-virtual-text").setup({
enabled = true,
enabled_commands = true,
highlight_changed_variables = true,
highlight_new_as_changed = true,
show_stop_reason = true,
commented = false,
all_references = false,
virt_text_pos = "eol",
all_frames = false,
virt_lines = false,
})
end,
},
{
"jay-babu/mason-nvim-dap.nvim",
dependencies = {
"mason.nvim",
"mfussenegger/nvim-dap",
},
config = function()
require("mason-nvim-dap").setup({
ensure_installed = { "delve", "dart" },
automatic_installation = true,
automatic_setup = true,
handlers = {
function(config)
require("mason-nvim-dap").default_setup(config)
end,
},
})
end,
},
{
"mfussenegger/nvim-dap-python",
dependencies = "mfussenegger/nvim-dap",
config = function()
-- use the system python as a default; venv-selector will
-- overwrite this when you pick a venv
require("dap-python").setup("python3") -- or an absolute path
end,
},
{
"linux-cultist/venv-selector.nvim",
dependencies = {
"neovim/nvim-lspconfig",
{
"nvim-telescope/telescope.nvim",
branch = "0.1.x",
dependencies = { "nvim-lua/plenary.nvim" },
},
"mfussenegger/nvim-dap-python", -- tiny wrapper that registers the debugpy adapter
"mfussenegger/nvim-dap",
},
lazy = false,
branch = "regexp",
keys = {
{ "<leader>v", "<cmd>VenvSelect<cr>" },
},
opts = {
dap_enabled = true,
search = {
anaconda_base = {
command = "fd /python$ /opt/homebrew/anaconda3/envs --full-path --color never -E /proc",
type = "anaconda",
},
},
},
},
}

View File

@@ -8,8 +8,7 @@ return {
},
config = function()
-- import lspconfig plugin
local lspconfig = require("lspconfig")
lspconfig.dartls.setup({})
local lspconfig = vim.lsp.config
-- import cmp-nvim-lsp plugin
local cmp_nvim_lsp = require("cmp_nvim_lsp")
@@ -50,12 +49,6 @@ return {
opts.desc = "Show line diagnostics"
keymap.set("n", "<leader>d", vim.diagnostic.open_float, opts) -- show diagnostics for line
opts.desc = "Go to previous diagnostic"
keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) -- jump to previous diagnostic in buffer
opts.desc = "Go to next diagnostic"
keymap.set("n", "]d", vim.diagnostic.goto_next, opts) -- jump to next diagnostic in buffer
opts.desc = "Show documentation for what is under cursor"
keymap.set("n", "K", vim.lsp.buf.hover, opts) -- show documentation for what is under cursor
@@ -79,15 +72,38 @@ return {
end
require("mason-lspconfig").setup({
ensure_installed = {
-- LSP server names only
"bashls", -- Bash
"clangd", -- C/C++
"cssls", -- CSS
"gopls", -- Go
"html", -- HTML
"jsonls", -- JSON
"lua_ls", -- Lua
"marksman", -- Markdown
"pyright", -- Python
"rust_analyzer", -- Rust
"taplo", -- TOML
"yamlls", -- YAML
"dockerls", -- Docker
"graphql", -- GraphQL
"sqlls", -- SQL (or try "sqls")
"perlnavigator", -- Perl
"vimls", -- Vim
"lemminx", -- XML
"cmake", -- CMake
"zls", -- Zig
},
automatic_installation = true,
handlers = {
function(server_name) -- default handler (optional)
require("lspconfig")[server_name].setup({
capabilities = capabilities,
})
end,
-- function(server_name) -- default handler (optional)
-- vim.lsp.config[server_name].setup({
-- capabilities = capabilities,
-- })
-- end,
zls = function()
local lspconfig = require("lspconfig")
lspconfig.zls.setup({
root_dir = lspconfig.util.root_pattern(".git", "build.zig", "zls.json"),
settings = {
@@ -102,7 +118,6 @@ return {
vim.g.zig_fmt_autosave = 0
end,
["lua_ls"] = function()
local lspconfig = require("lspconfig")
lspconfig.lua_ls.setup({
capabilities = capabilities,
settings = {

View File

@@ -21,33 +21,6 @@ return {
},
})
require("mason-lspconfig").setup({
ensure_installed = {
-- LSP server names only
"bashls", -- Bash
"clangd", -- C/C++
"cssls", -- CSS
"gopls", -- Go
"html", -- HTML
"jsonls", -- JSON
"lua_ls", -- Lua
"marksman", -- Markdown
"pyright", -- Python
"rust_analyzer", -- Rust
"taplo", -- TOML
"yamlls", -- YAML
"dockerls", -- Docker
"graphql", -- GraphQL
"sqlls", -- SQL (or try "sqls")
"perlnavigator", -- Perl
"vimls", -- Vim
"lemminx", -- XML
"cmake", -- CMake
"zls", -- Zig
},
automatic_installation = true,
})
mason_tool_installer.setup({
ensure_installed = {
"prettier", -- prettier formatter

View File

@@ -51,8 +51,8 @@ return {
end, { desc = "Debug: Debug Nearest Test" })
vim.keymap.set("n", "<leader>to", function()
require("neotest").output.open()
end, { desc = "Debug: Open test output" })
require("neotest").output_panel.open()
end, { desc = "Debug: Open test output panel" })
vim.keymap.set("n", "<leader>ta", function()
require("neotest").run.run(vim.fn.getcwd())

View File

@@ -1,86 +1,70 @@
return {
"hrsh7th/nvim-cmp",
dependencies = {
-- basic sources
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
-- cmdline completion for `:` and `/`
"hrsh7th/cmp-cmdline", -- :contentReference[oaicite:0]{index=0}
-- LSP
"hrsh7th/cmp-nvim-lsp", -- :contentReference[oaicite:1]{index=1}
-- Treesitter source
"ray-x/cmp-treesitter", -- :contentReference[oaicite:2]{index=2}
"hrsh7th/nvim-cmp",
dependencies = {
-- basic sources
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
-- cmdline completion for `:` and `/`
"hrsh7th/cmp-cmdline", -- :contentReference[oaicite:0]{index=0}
-- LSP
"hrsh7th/cmp-nvim-lsp", -- :contentReference[oaicite:1]{index=1}
-- Treesitter source
"ray-x/cmp-treesitter", -- :contentReference[oaicite:2]{index=2}
-- snippet engine & integration (optional)
{
"L3MON4D3/LuaSnip",
version = "v2.*",
build = "make install_jsregexp",
},
"saadparwaiz1/cmp_luasnip",
"rafamadriz/friendly-snippets",
"rafamadriz/friendly-snippets",
-- icons
"onsails/lspkind.nvim",
},
config = function()
local cmp = require("cmp")
local luasnip = require("luasnip")
local lspkind = require("lspkind")
-- icons
"onsails/lspkind.nvim",
},
-- load friendly-snippets
require("luasnip.loaders.from_vscode").lazy_load()
config = function()
local cmp = require("cmp")
local lspkind = require("lspkind")
-- nicer completions menu
vim.opt.completeopt = "menu,menuone,preview,noselect"
-- load friendly-snippets
cmp.setup({
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
["<C-k>"] = cmp.mapping.select_prev_item(),
["<C-j>"] = cmp.mapping.select_next_item(),
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = false }),
}),
sources = cmp.config.sources({
{ name = "luasnip" },
{ name = "nvim_lsp" },
{ name = "treesitter" },
{ name = "buffer" },
{ name = "path" },
}),
formatting = {
format = lspkind.cmp_format({
maxwidth = 50,
ellipsis_char = "...",
}),
},
})
-- nicer completions menu
vim.opt.completeopt = "menu,menuone,preview,noselect"
-- Commandline “:” → cmdline + path
cmp.setup.cmdline(":", {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = "path" },
{ name = "cmdline" },
},
})
cmp.setup({
mapping = cmp.mapping.preset.insert({
["<C-k>"] = cmp.mapping.select_prev_item(),
["<C-j>"] = cmp.mapping.select_next_item(),
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = false }),
}),
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "treesitter" },
{ name = "buffer" },
{ name = "path" },
}),
formatting = {
format = lspkind.cmp_format({
maxwidth = 50,
ellipsis_char = "...",
}),
},
})
-- Search/” → buffer
cmp.setup.cmdline("/", {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = "buffer" },
},
})
end,
-- Commandline:” → cmdline + path
cmp.setup.cmdline(":", {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = "path" },
{ name = "cmdline" },
},
})
-- Search “/” → buffer
cmp.setup.cmdline("/", {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = "buffer" },
},
})
end,
}

View File

@@ -1,11 +0,0 @@
return {
"luckasRanarison/tailwind-tools.nvim",
name = "tailwind-tools",
build = ":UpdateRemotePlugins",
dependencies = {
"nvim-treesitter/nvim-treesitter",
"nvim-telescope/telescope.nvim", -- optional
"neovim/nvim-lspconfig", -- optional
},
opts = {}, -- your configuration
}

View File

@@ -82,6 +82,7 @@ return {
-- Other Neovim-related
"vimdoc",
"yaml",
"swift",
},
})
end,