Compare commits

..

19 Commits

Author SHA1 Message Date
Radu Macocian (admac) 3fe4aa1205 added go dap 2026-06-27 22:08:38 +02:00
Radu Macocian (admac) c6739ea0da Removed C-e C-y shortcuts on neoscroll 2026-06-22 20:08:03 +02:00
Radu Macocian (admac) 1b406704ad Fixed tidal 2026-06-12 16:56:09 +02:00
Radu Macocian (admac) aeab462a8b fixed eslint 2026-06-01 09:13:18 +02:00
Radu Macocian (admac) 7ba072972f enabled ts_ls 2026-05-31 10:16:12 +02:00
Radu Macocian (admac) 99a9f3ae12 added smooth scroll 2026-05-12 16:32:42 +02:00
Radu Macocian (admac) 5d1755fe96 changed code companion models 2026-05-12 16:27:32 +02:00
Radu Macocian (admac) 815f689f3c fixed code companion 2026-04-30 16:27:09 +02:00
Radu Macocian (admac) c201aa51db added autoread 2026-04-30 15:33:24 +02:00
Radu Macocian (admac) 15e7488d64 removed install.sh 2026-04-30 15:23:49 +02:00
Radu Macocian (admac) dab574ff79 added snacks terminal handling 2026-04-30 15:20:12 +02:00
Radu Macocian (admac) 483b04ed68 Added git blame for whole file 2026-04-22 13:05:27 +02:00
Radu Macocian 12db5d84f4 replaced telescope with snacks 2026-04-22 11:02:23 +02:00
Radu Macocian 802cc1dcfc Made neogit floating 2026-04-22 09:41:24 +02:00
Radu Macocian dc35a0b460 untrack lazy lock 2026-04-22 09:18:32 +02:00
Radu Macocian (admac) ec08eedea9 fixed treesitter main 2026-04-09 19:47:39 +02:00
Radu Macocian (admac) 9abd126c37 Roslyn 2026-04-08 18:23:10 +02:00
Radu Macocian (admac) 39bcb18f3e Fixed angular lsp 2026-04-08 08:54:21 +02:00
Radu Macocian (admac) 40bcb42ee0 added strudel and openrouter 2026-04-08 08:53:51 +02:00
21 changed files with 466 additions and 297 deletions
+50 -5
View File
@@ -1,7 +1,19 @@
require('codecompanion').setup({ require('codecompanion').setup({
extensions = { extensions = {
history = { history = {
enabled= true, enabled = true,
opts = {
title_generation_opts = {
adapter = "openrouter",
model = "qwen/qwen3.6-flash"
}
},
summary = {
generation_opts = {
adapter = "openrouter",
model = "qwen/qwen3.6-flash"
}
}
}, },
}, },
adapters = { adapters = {
@@ -15,23 +27,56 @@ require('codecompanion').setup({
}, },
schema = { schema = {
model = { model = {
default = "qwen3.5:9b", -- Use the exact model name from your PC default = "qwen3.5:9b",
} }
} }
}) })
end, end,
openrouter = function()
return require("codecompanion.adapters").extend("openai_compatible", {
env = {
url = "https://openrouter.ai/api",
api_key = os.getenv("OPENROUTER_API_KEY"),
chat_url = "/v1/chat/completions",
},
schema = {
model = {
default = "qwen/qwen3.6-flash",
},
},
})
end,
}, },
acp = { acp = {
claude_code = function() claude_code = function()
return require("codecompanion.adapters").extend("claude_code", { }) return require("codecompanion.adapters").extend("claude_code", {})
end end
} }
}, },
interactions = { interactions = {
chat = { chat = {
adapter = "claude_code", adapter = "opencode",
},
inline = {
adapter = "openrouter",
} }
} }
}) })
vim.keymap.set('n', '<leader>gpt', function() require("codecompanion").chat({strategy = "agent" }) end); vim.keymap.set('n', '<leader>gpt', function() require("codecompanion").chat({ strategy = "agent" }) end);
vim.keymap.set('n', 'gpi', function()
Snacks.input({ prompt = "Prompt: " }, function(input)
if input and input ~= "" then
vim.cmd("CodeCompanion " .. input)
end
end)
end)
vim.keymap.set('v', 'gpi', function()
Snacks.input({ prompt = "Prompt (with context): " }, function(input)
if input and input ~= "" then
vim.cmd("'<,'>CodeCompanion " .. input)
end
end)
end)
+8 -1
View File
@@ -10,6 +10,7 @@ dap.listeners.after.event_exited["dapui_config"] = function() dapui.close() end
local dotnet = require("dap.dap-dotnet") local dotnet = require("dap.dap-dotnet")
local odoo = require("dap.dap-odoo") local odoo = require("dap.dap-odoo")
local haskell = require("dap.dap-haskell") local haskell = require("dap.dap-haskell")
local go = require("dap.dap-go")
vim.keymap.set("n", "<leader>5", function() vim.keymap.set("n", "<leader>5", function()
@@ -18,6 +19,10 @@ vim.keymap.set("n", "<leader>5", function()
return return
end end
local ft = vim.bo.filetype local ft = vim.bo.filetype
if ft == "go" then
go.debug_go()
return
end
if ft == "cs" or ft == "fsharp" or ft == "vb" then if ft == "cs" or ft == "fsharp" or ft == "vb" then
dotnet.debug_dotnet_from_sln() dotnet.debug_dotnet_from_sln()
return return
@@ -39,7 +44,9 @@ vim.keymap.set("n", "<leader>b", function() dap.toggle_breakpoint() end)
vim.keymap.set("n", "<leader>B", function() dap.set_breakpoint(vim.fn.input("Breakpoint condition: ")) end) vim.keymap.set("n", "<leader>B", function() dap.set_breakpoint(vim.fn.input("Breakpoint condition: ")) end)
vim.keymap.set("n", "<leader>qd", function() dap.terminate() end) vim.keymap.set("n", "<leader>qd", function() dap.terminate() end)
vim.keymap.set("n", "<leader>rd", function() dap.restart() end) vim.keymap.set("n", "<leader>rd", function() dap.restart() end)
vim.keymap.set("n", "<leader>dt", odoo.run_odoo_test_at_cursor, { desc = "Debug Odoo Test unde Cursor" }) vim.keymap.set("n", "<leader>dt", function()
odoo.run_odoo_test_at_cursor()
end, { desc = "Debug Test under Cursor" })
dap.configurations.python = { dap.configurations.python = {
{ {
+2 -1
View File
@@ -48,4 +48,5 @@ require('gitsigns').setup {
}, },
} }
vim.keymap.set('n', '<leader>gb', ':Gitsigns blame_line<CR>', { desc = '[G]it [B]lame' }) vim.keymap.set('n', '<leader>gb', ':Gitsigns blame_line<CR>', { desc = '[G]it [B]lame line' })
vim.keymap.set('n', '<leader>gB', ':Gitsigns blame<CR>', { desc = '[G]it [B]lame' })
+28 -55
View File
@@ -1,10 +1,3 @@
local pickers = require("telescope.pickers")
local finders = require("telescope.finders")
local conf = require("telescope.config").values
local previewers = require("telescope.previewers")
local actions = require("telescope.actions")
local action_state = require("telescope.actions.state")
local STOP_WORDS = { local STOP_WORDS = {
["a"] = true, ["a"] = true,
["an"] = true, ["an"] = true,
@@ -35,9 +28,6 @@ local function parse_query_mode(raw_query)
return "type", vim.trim((query:gsub("^type:%s*", "", 1))) return "type", vim.trim((query:gsub("^type:%s*", "", 1)))
end end
-- Heuristic:
-- - Queries that look like signatures/operators stay in type mode.
-- - Everything else defaults to text mode so plain-language search works.
local looks_like_type = query:match("::") local looks_like_type = query:match("::")
or query:match("->") or query:match("->")
or query:match("=>") or query:match("=>")
@@ -169,8 +159,8 @@ local function hoogle_picker(query)
return return
end end
local results = {} local items = {}
for _, entry in ipairs(decoded) do for idx, entry in ipairs(decoded) do
local signature = entry.item or "" local signature = entry.item or ""
local docs = entry.docs or "" local docs = entry.docs or ""
local url = entry.url local url = entry.url
@@ -185,7 +175,9 @@ local function hoogle_picker(query)
display = display .. " - " .. docs_one_line display = display .. " - " .. docs_one_line
end end
table.insert(results, { table.insert(items, {
idx = idx,
text = signature .. " " .. (docs or ""),
signature = signature, signature = signature,
docs = docs, docs = docs,
url = url, url = url,
@@ -193,54 +185,36 @@ local function hoogle_picker(query)
}) })
end end
pickers.new({}, { Snacks.picker.pick({
prompt_title = ("Hoogle (%s): %s"):format(mode, normalized_query), source = "hoogle",
finder = finders.new_table({ title = ("Hoogle (%s): %s"):format(mode, normalized_query),
results = results, items = items,
entry_maker = function(entry) format = function(item)
return { return { { item.display, "SnacksPickerLabel" } }
value = entry,
display = entry.display,
ordinal = entry.signature .. " " .. (entry.docs or ""),
}
end, end,
}), preview = function(ctx)
sorter = conf.generic_sorter({}), local item = ctx.item
previewer = previewers.new_buffer_previewer({ local lines = { item.signature or "" }
define_preview = function(self, entry) if item.docs and item.docs ~= "" then
local value = entry.value or {} table.insert(lines, "")
local preview_lines = { value.signature or "" } vim.list_extend(lines, vim.split(item.docs, "\n", { plain = true }))
if value.docs and value.docs ~= "" then
table.insert(preview_lines, "")
vim.list_extend(preview_lines, vim.split(value.docs, "\n", { plain = true }))
else else
table.insert(preview_lines, "") table.insert(lines, "")
table.insert(preview_lines, "No documentation available.") table.insert(lines, "No documentation available.")
end end
if item.url and item.url ~= "" then
if value.url and value.url ~= "" then table.insert(lines, "")
table.insert(preview_lines, "") table.insert(lines, item.url)
table.insert(preview_lines, value.url)
end end
vim.api.nvim_buf_set_lines(ctx.buf, 0, -1, false, lines)
vim.api.nvim_buf_set_lines(self.state.bufnr, 0, -1, false, preview_lines)
end, end,
}), confirm = function(picker, item)
attach_mappings = function(prompt_bufnr, map) picker:close()
local function open_result() if item and item.url then
local selection = action_state.get_selected_entry() vim.ui.open(item.url)
actions.close(prompt_bufnr)
if selection and selection.value and selection.value.url then
vim.ui.open(selection.value.url)
end end
end
map("i", "<CR>", open_result)
map("n", "<CR>", open_result)
return true
end, end,
}):find() })
end end
vim.api.nvim_create_user_command("Hoogle", function(opts) vim.api.nvim_create_user_command("Hoogle", function(opts)
@@ -256,4 +230,3 @@ end, { desc = "Hoogle current word" })
vim.keymap.set("n", "<leader>ht", function() vim.keymap.set("n", "<leader>ht", function()
vim.cmd("Hoogle " .. vim.fn.input("Hoogle type/text > ")) vim.cmd("Hoogle " .. vim.fn.input("Hoogle type/text > "))
end, { desc = "Hoogle query" }) end, { desc = "Hoogle query" })
+14 -5
View File
@@ -12,7 +12,7 @@ local angular_cmd = {
'--tsProbeLocations', '--tsProbeLocations',
project_library_path, project_library_path,
'--ngProbeLocations', '--ngProbeLocations',
project_library_path .. '@angular/language-server' project_library_path .. '/@angular/language-server'
} }
vim.lsp.config("ts_ls", {}) vim.lsp.config("ts_ls", {})
@@ -23,38 +23,47 @@ vim.lsp.config("angularls", {
end end
}) })
vim.lsp.config("ruff", {}) vim.lsp.config("ruff", {})
vim.lsp.config("gopls", {})
vim.lsp.config("cssls", {}) vim.lsp.config("cssls", {})
vim.lsp.config("lua_ls", {}) vim.lsp.config("lua_ls", {})
vim.lsp.config("hls", {}) vim.lsp.config("hls", {})
vim.lsp.config("roslyn", {})
vim.lsp.config("odoo_ls", { vim.lsp.config("odoo_ls", {
cmd = { cmd = {
vim.fn.expand('$HOME/.local/share/nvim/odoo/odoo_ls_server'), vim.fn.expand('$HOME/.local/share/nvim/odoo/odoo_ls_server'),
'--config-path', vim.fn.expand('$HOME/projects/odoo/odools.toml'), '--config-path', vim.fn.expand('$HOME/projects/odoo/odools.toml'),
} }
}) })
vim.lsp.config("qmlls", {
cmd = { "qmlls6", "-E" }
})
vim.lsp.config("lemminx", {}) vim.lsp.config("lemminx", {})
vim.lsp.config("eslint", { vim.lsp.config("eslint", {
cmd = { "vscode-eslint-language-server", "--stdio" }, cmd = { "vscode-eslint-language-server", "--stdio" },
root_markers = { ".eslintrc", ".eslintrc.json", ".eslintrc.js", "package.json", ".git" }, root_markers = { ".eslintrc", ".eslintrc.json", ".eslintrc.js", "package.json", ".git" },
filetypes = { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "svelte" }, filetypes = { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "svelte" },
settings = { settings = {
eslint = {
validate = "on", validate = "on",
packageManager = "npm", packageManager = "npm",
workingDirectory = { mode = "auto" }, workingDirectory = { mode = "auto" },
debug = true, debug = true,
format = true, format = { enable = true },
}
}, },
on_attach = function(client, bufnr)
client.server_capabilities.documentFormattingProvider = true
client.server_capabilities.documentRangeFormattingProvider = true
end,
}) })
vim.lsp.enable({"angularls", "odoo_ls", "hls", "ruff", "eslint", "cssls", "lua_ls", "lemminx"}) vim.lsp.enable({ "angularls", "ts_ls", "odoo_ls", "hls", "ruff", "eslint", "cssls", "lua_ls", "lemminx", "qmlls", "gopls" })
vim.api.nvim_create_autocmd('LspAttach', { vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('user_lsp_attach', { clear = true }), group = vim.api.nvim_create_augroup('user_lsp_attach', { clear = true }),
callback = function(event) callback = function(event)
local opts = { buffer = event.buf } local opts = { buffer = event.buf }
vim.keymap.set('n', 'gd', function() require('telescope.builtin').lsp_definitions() end, opts) vim.keymap.set('n', 'gd', function() Snacks.picker.lsp_definitions() end, opts)
vim.keymap.set('n', 'K', function() vim.lsp.buf.hover() end, opts) vim.keymap.set('n', 'K', function() vim.lsp.buf.hover() end, opts)
vim.keymap.set('n', '<leader>vws', function() vim.lsp.buf.workspace_symbol() end, opts) vim.keymap.set('n', '<leader>vws', function() vim.lsp.buf.workspace_symbol() end, opts)
vim.keymap.set('n', '<leader>vd', function() vim.diagnostic.open_float() end, opts) vim.keymap.set('n', '<leader>vd', function() vim.diagnostic.open_float() end, opts)
@@ -1,6 +0,0 @@
require('mason').setup {}
require("mason-lspconfig").setup {
ensure_installed = { "lua_ls",
"cssls",
"eslint" },
}
+19
View File
@@ -0,0 +1,19 @@
local neoscroll = require('neoscroll')
neoscroll.setup({
easing = 'quadratic',
mappings = {
},
})
local keymap = {
['<C-u>'] = function() neoscroll.ctrl_u({ duration = 125 }) end,
['<C-d>'] = function() neoscroll.ctrl_d({ duration = 125 }) end,
['<C-b>'] = function() neoscroll.ctrl_b({ duration = 200 }) end,
['<C-f>'] = function() neoscroll.ctrl_f({ duration = 200 }) end,
['zt'] = function() neoscroll.zt({ half_win_duration = 125 }) end,
['zz'] = function() neoscroll.zz({ half_win_duration = 125 }) end,
['zb'] = function() neoscroll.zb({ half_win_duration = 125 }) end,
}
for key, func in pairs(keymap) do
vim.keymap.set({ 'n', 'v', 'x' }, key, func)
end
+73 -1
View File
@@ -18,5 +18,77 @@ require("snacks").setup {
enabled = true, enabled = true,
char = "" char = ""
} }
} },
picker = {
enabled = true,
ui_select = true,
formatters = {
file = {
truncate = "left",
min_width = 160,
},
},
},
dashboard = {
enabled = true,
},
terminal = {
enabled = true,
},
} }
local picker = Snacks.picker
vim.keymap.set('n', '<leader>pf', function() picker.files() end)
vim.keymap.set('n', '<C-p>p', function() picker.git_files() end)
vim.keymap.set('n', '<leader>sw', function() picker.lsp_workspace_symbols() end)
vim.keymap.set('n', '<leader>ps', function()
picker.grep({ search = vim.fn.input("Grep > "), live = false })
end)
local term_buf
local function find_term_win()
if not (term_buf and vim.api.nvim_buf_is_valid(term_buf)) then return end
for _, w in ipairs(vim.api.nvim_list_wins()) do
if vim.api.nvim_win_get_buf(w) == term_buf then return w end
end
end
local function toggle_term(fullscreen)
local win_opts = fullscreen and {
position = "float",
width = 0.98,
height = 0.98,
border = "rounded",
} or {
position = "bottom",
height = 0.2,
border = "none",
}
local existing = find_term_win()
if existing then
local is_float = vim.api.nvim_win_get_config(existing).relative ~= ""
vim.api.nvim_win_close(existing, true)
if is_float == fullscreen then return end
end
if term_buf and vim.api.nvim_buf_is_valid(term_buf) then
Snacks.win(vim.tbl_extend("force", win_opts, {
buf = term_buf,
enter = true,
bo = { filetype = "snacks_terminal" },
}))
vim.cmd.startinsert()
else
local term = Snacks.terminal.toggle(nil, { win = win_opts })
if term then term_buf = term.buf end
end
end
vim.keymap.set("n", "<leader>tt", function() toggle_term(false) end, { desc = "Terminal (split)" })
vim.keymap.set("n", "<leader>tT", function() toggle_term(true) end, { desc = "Terminal (fullscreen)" })
vim.keymap.set("t", "<C-t>", function()
local w = find_term_win()
if w then vim.api.nvim_win_close(w, true) end
end, { desc = "Hide terminal" })
+9
View File
@@ -0,0 +1,9 @@
local strudel = require("strudel")
vim.keymap.set("n", "<leader>sl", strudel.launch, { desc = "Launch Strudel" })
vim.keymap.set("n", "<leader>sq", strudel.quit, { desc = "Quit Strudel" })
vim.keymap.set("n", "<leader>st", strudel.toggle, { desc = "Strudel Toggle Play/Stop" })
vim.keymap.set("n", "<leader>su", strudel.update, { desc = "Strudel Update" })
vim.keymap.set("n", "<leader>ss", strudel.stop, { desc = "Strudel Stop Playback" })
vim.keymap.set("n", "<leader>sb", strudel.set_buffer, { desc = "Strudel set current buffer" })
vim.keymap.set("n", "<leader>sx", strudel.execute, { desc = "Strudel set current buffer and update" })
-17
View File
@@ -1,17 +0,0 @@
require('telescope').setup {
extensions = {
["ui_select"] = {
require('telescope.themes').get_dropdown {
}
}
}
}
require('telescope').load_extension('ui-select')
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>pf', builtin.find_files, {})
vim.keymap.set('n', '<C-p>p', builtin.git_files, {})
vim.keymap.set('n', '<leader>sw', '<cmd>Telescope lsp_workspace_symbols<cr>', {})
vim.keymap.set('n', '<leader>ps', function()
builtin.grep_string({ search = vim.fn.input("Grep > ") });
end)
+72
View File
@@ -1,2 +1,74 @@
vim.keymap.set("n", "<leader>tl", "<cmd>TidalLaunch<cr>") vim.keymap.set("n", "<leader>tl", "<cmd>TidalLaunch<cr>")
vim.keymap.set("n", "<leader>tq", "<cmd>TidalQuit<cr>") vim.keymap.set("n", "<leader>tq", "<cmd>TidalQuit<cr>")
local scd = os.getenv("HOME") .. "/.local/share/tidal/BootSuperDirt.scd"
local function superdirt_running()
local id = vim.g.superdirt_job
return id and id > 0 and vim.fn.jobwait({ id }, 0)[1] == -1
end
local function log_buf()
local b = vim.g.superdirt_buf
if not (b and vim.api.nvim_buf_is_valid(b)) then
b = vim.api.nvim_create_buf(false, true)
vim.api.nvim_buf_set_name(b, "SuperDirt")
vim.g.superdirt_buf = b
end
return b
end
local function append(_, data)
if not data then return end
vim.schedule(function()
local lines = {}
for _, l in ipairs(data) do
l = l:gsub("\r", "")
table.insert(lines, l)
if l:match("SuperDirt:%s*listening") then
vim.notify("SuperDirt ready", vim.log.levels.INFO)
elseif l:match("ERROR") then
vim.notify("SuperDirt: " .. l, vim.log.levels.ERROR)
end
end
vim.api.nvim_buf_set_lines(log_buf(), -1, -1, false, lines)
end)
end
vim.api.nvim_create_user_command("SuperDirtLog", function()
vim.cmd("botright split")
vim.api.nvim_win_set_buf(0, log_buf())
end, { desc = "Open SuperDirt output log" })
local group = vim.api.nvim_create_augroup("TidalSuperDirt", { clear = true })
vim.api.nvim_create_autocmd("User", {
group = group,
pattern = "TidalLaunch",
callback = function()
if superdirt_running() then
vim.notify("SuperDirt already running", vim.log.levels.INFO)
return
end
vim.fn.deletebufline(log_buf(), 1, "$")
vim.g.superdirt_job = vim.fn.jobstart({ "sclang", scd }, {
on_stdout = append,
on_stderr = append,
on_exit = function() vim.g.superdirt_job = nil end,
})
if vim.g.superdirt_job <= 0 then
vim.notify("Failed to start sclang (is SuperCollider installed?)", vim.log.levels.ERROR)
else
vim.notify("Booting SuperDirt... (:SuperDirtLog for output)", vim.log.levels.INFO)
end
end,
})
vim.api.nvim_create_autocmd("VimLeavePre", {
group = group,
callback = function()
if superdirt_running() then
vim.fn.jobstop(vim.g.superdirt_job)
end
end,
})
+29 -38
View File
@@ -1,6 +1,8 @@
require 'nvim-treesitter.config'.setup { local ts = require('nvim-treesitter')
-- A list of parser names, or "all" (the listed parsers MUST always be installed)
ensure_installed = { ts.setup{}
ts.install({
"vimdoc", "vimdoc",
"javascript", "javascript",
"typescript", "typescript",
@@ -12,40 +14,29 @@ require 'nvim-treesitter.config'.setup {
"query", "query",
"markdown", "markdown",
"markdown_inline", "markdown_inline",
"yaml" "yaml",
}, "haskell"
})
-- Install parsers synchronously (only applied to `ensure_installed`) vim.api.nvim_create_autocmd('FileType', {
sync_install = false, callback = function(ev)
local lang = vim.treesitter.language.get_lang(ev.match)
local available_langs = ts.get_available()
local is_available = vim.tbl_contains(available_langs, lang)
if is_available then
local installed_langs = ts.get_installed()
local installed = vim.tbl_contains(installed_langs, lang)
if not installed then
ts.install(lang):await()
end
vim.treesitter.start()
ts.indentexpr()
end
vim.wo[0][0].foldexpr = 'v:lua.vim.treesitter.foldexpr()'
vim.wo[0][0].foldmethod = 'expr'
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
end,
})
-- Automatically install missing parsers when entering buffer vim.o.foldlevel = 99
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally vim.o.foldlevelstart = 99
auto_install = true,
---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
highlight = {
enable = true,
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
indent = {
enable = true,
disable = { "xml", "python" },
},
fold = {
enable = true,
},
}
vim.o.foldmethod = "expr"
vim.o.foldexpr = "nvim_treesitter#foldexpr()"
vim.opt.foldlevel = 99
vim.opt.foldlevelstart = 99
-43
View File
@@ -1,43 +0,0 @@
{
"LuaSnip": { "branch": "master", "commit": "642b0c595e11608b4c18219e93b88d7637af27bc" },
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
"codecompanion-history.nvim": { "branch": "main", "commit": "bc1b4fe06eaaf0aa2399be742e843c22f7f1652a" },
"codecompanion.nvim": { "branch": "main", "commit": "558518f8d78a44198cd428f6bf8bf48bfa38d76d" },
"dashboard-nvim": { "branch": "master", "commit": "0775e567b6c0be96d01a61795f7b64c1758262f6" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"everforest-nvim": { "branch": "main", "commit": "323e7633034a8068636a11597cec03bca5465c50" },
"gitlinker.nvim": { "branch": "master", "commit": "bbe2a1254fc8fce21f3bbf9a020266a1c49799f7" },
"gitsigns.nvim": { "branch": "main", "commit": "0a80125bace82d82847d40bc2c38a22d62c6dc2d" },
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "a979821a975897b88493843301950c456a725982" },
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
"mini.icons": { "branch": "main", "commit": "5b9076dae1bfbe47ba4a14bc8b967cde0ab5d77e" },
"neogit": { "branch": "master", "commit": "d3890fc3cdf0859845a86b2be306bba01458df1a" },
"nord.nvim": { "branch": "master", "commit": "80c1e5321505aeb22b7a9f23eb82f1e193c12470" },
"nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" },
"nvim-dap": { "branch": "master", "commit": "a9d8cb68ee7184111dc66156c4a2ebabfbe01bc5" },
"nvim-dap-python": { "branch": "master", "commit": "1808458eba2b18f178f990e01376941a42c7f93b" },
"nvim-dap-ui": { "branch": "master", "commit": "f5b6673f374626515401c5bc51b005f784a4f252" },
"nvim-lspconfig": { "branch": "master", "commit": "841c6d4139aedb8a3f2baf30cef5327371385b93" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-scrollbar": { "branch": "main", "commit": "f8e87b96cd6362ef8579be456afee3b38fd7e2a8" },
"nvim-treesitter": { "branch": "main", "commit": "6620ae1c44dfa8623b22d0cbf873a9e8d073b849" },
"nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" },
"obsidian.nvim": { "branch": "main", "commit": "6ea8b9d1ce10dd41795f298dd7f4dd3a26887d39" },
"odoo-neovim": { "branch": "main", "commit": "6ea306ebcdfa1ee13524c05757f5e739cb2e8001" },
"oil.nvim": { "branch": "master", "commit": "0fcc83805ad11cf714a949c98c605ed717e0b83e" },
"persistence.nvim": { "branch": "main", "commit": "b20b2a7887bd39c1a356980b45e03250f3dce49c" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"render-markdown.nvim": { "branch": "main", "commit": "e3c18ddd27a853f85a6f513a864cf4f2982b9f26" },
"smear-cursor.nvim": { "branch": "main", "commit": "c85bdbb25db096fbcf616bc4e1357bd61fe2c199" },
"snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "master", "commit": "5255aa27c422de944791318024167ad5d40aad20" },
"tidal.nvim": { "branch": "develop", "commit": "bcc9679a1932cfa2f75a38ddf3af18ed344da1fe" },
"undotree": { "branch": "master", "commit": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d" },
"vim-projectionist": { "branch": "master", "commit": "5ff7bf79a6ef741036d2038a226bcb5f8b1cd296" },
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }
}
+1 -1
View File
@@ -5,7 +5,7 @@ local M = {}
-- Adapter (netcoredbg) -- Adapter (netcoredbg)
dap.adapters.coreclr = { dap.adapters.coreclr = {
type = "executable", type = "executable",
command = "/home/radu/.local/share/nvim/mason/bin/netcoredbg", command = vim.fn.expand("$HOME/.local/share/nvim/mason/bin/netcoredbg"),
args = { "--interpreter=vscode" }, args = { "--interpreter=vscode" },
} }
+53
View File
@@ -0,0 +1,53 @@
local dap = require("dap")
local M = {}
-- Locate the delve binary (prefer mason, fall back to PATH).
local function dlv_command()
local mason = vim.fn.expand("$HOME/.local/share/nvim/mason/bin/dlv")
if vim.fn.filereadable(mason) == 1 then
return mason
end
return "dlv"
end
-- Adapter: run delve in DAP server mode on a free port.
dap.adapters.go = {
type = "server",
port = "${port}",
executable = {
command = dlv_command(),
args = { "dap", "-l", "127.0.0.1:${port}" },
},
}
-- Walk upwards from the current file to find the Go module root (go.mod).
local function find_go_root()
local start = vim.fn.expand("%:p:h")
if start == "" then
start = vim.fn.getcwd()
end
local found = vim.fs.find("go.mod", { upward = true, path = start })[1]
if found then
return vim.fn.fnamemodify(found, ":h")
end
return nil
end
-- Find the module root and launch a delve debug session of the whole project.
function M.debug_go()
local root = find_go_root()
if not root then
vim.notify("No go.mod found upwards from current file.", vim.log.levels.ERROR)
return
end
dap.run({
type = "go",
request = "launch",
name = "Debug project",
program = root,
cwd = root,
})
end
return M
+16 -27
View File
@@ -18,10 +18,6 @@ vim.opt.rtp:prepend(lazypath)
-- Setup lazy.nvim -- Setup lazy.nvim
require("lazy").setup({ require("lazy").setup({
spec = { spec = {
{
'nvim-telescope/telescope.nvim',
dependencies = { 'nvim-lua/plenary.nvim' }
},
{ {
'neanias/everforest-nvim', 'neanias/everforest-nvim',
config = function() config = function()
@@ -32,18 +28,18 @@ require("lazy").setup({
'shaunsingh/nord.nvim' 'shaunsingh/nord.nvim'
}, },
{ {
"thgrund/tidal.nvim", "gruvw/strudel.nvim",
build = "npm ci",
config = function()
require("strudel").setup()
end,
},
{
"https://codeberg.org/MrReason/tidal.nvim",
opts = { opts = {
boot = { boot = {
tidal = { tidal = {
cmd = os.getenv("HOME") .. "/.ghcup/bin/ghci", cmd = os.getenv("HOME") .. "/.ghcup/bin/ghci",
highlight = {
autostart = true,
},
},
sclang = {
enabled = true ,
file = os.getenv("HOME") .. "/.local/share/tidal/BootSuperDirt.scd",
}, },
}, },
}, },
@@ -54,7 +50,11 @@ require("lazy").setup({
}, },
}, },
'odoo/odoo-neovim', 'odoo/odoo-neovim',
{
'nvim-treesitter/nvim-treesitter', 'nvim-treesitter/nvim-treesitter',
lazy = false,
build = ':TSUpdate'
},
{ {
'theprimeagen/harpoon', 'theprimeagen/harpoon',
branch = 'harpoon2', branch = 'harpoon2',
@@ -81,8 +81,8 @@ require("lazy").setup({
}, },
}, },
'tpope/vim-surround', 'tpope/vim-surround',
'nvim-telescope/telescope-ui-select.nvim',
'sphamba/smear-cursor.nvim', 'sphamba/smear-cursor.nvim',
'karb94/neoscroll.nvim',
{ {
"folke/persistence.nvim", "folke/persistence.nvim",
event = "BufReadPre", event = "BufReadPre",
@@ -112,24 +112,13 @@ require("lazy").setup({
"folke/snacks.nvim", "folke/snacks.nvim",
'lewis6991/gitsigns.nvim', 'lewis6991/gitsigns.nvim',
'tpope/vim-projectionist', 'tpope/vim-projectionist',
'williamboman/mason-lspconfig.nvim',
{ {
"NeogitOrg/neogit", "NeogitOrg/neogit",
dependencies = { dependencies = {
"sindrets/diffview.nvim", -- optional - Diff integration "sindrets/diffview.nvim",
}, },
config = true config = true
}, },
{
'nvimdev/dashboard-nvim',
event = 'VimEnter',
config = function()
require('dashboard').setup {
-- config
}
end,
dependencies = { { 'nvim-tree/nvim-web-devicons' } }
},
'neovim/nvim-lspconfig', 'neovim/nvim-lspconfig',
{ {
'nvim-lualine/lualine.nvim', 'nvim-lualine/lualine.nvim',
@@ -146,12 +135,12 @@ require("lazy").setup({
opts = {}, opts = {},
keys = { keys = {
{ "<leader>gy", "<cmd>GitLink<cr>", mode = { "n", "v" }, desc = "Yank git link" }, { "<leader>gy", "<cmd>GitLink<cr>", mode = { "n", "v" }, desc = "Yank git link" },
{ "<leader>gY", "<cmd>GitLink!<cr>", mode = { "n", "v" }, desc = "Open git link" }, { "<leader>gY", "<cmd>GitLink! blame<cr>", mode = { "n", "v" }, desc = "Open git blame link" },
{ "<leader>gB", "<cmd>GitLink! blame<cr>", mode = { "n", "v" }, desc = "Open git blame link" },
}, },
}, },
'hrsh7th/cmp-buffer', 'hrsh7th/cmp-buffer',
'hrsh7th/nvim-cmp', 'hrsh7th/nvim-cmp',
'seblyng/roslyn.nvim',
'L3MON4D3/LuaSnip', 'L3MON4D3/LuaSnip',
{ {
'mfussenegger/nvim-dap-python', 'mfussenegger/nvim-dap-python',
+14 -4
View File
@@ -1,10 +1,8 @@
vim.g.mapleader = " " vim.g.mapleader = " "
vim.keymap.set("n", "<leader>pv", function () vim.keymap.set("n", "<leader>pv", function()
require("oil").toggle_float() require("oil").toggle_float()
end) end)
vim.keymap.set("n", "<leader>u", ":UndotreeShow<CR>")
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv") vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv") vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
@@ -39,6 +37,18 @@ vim.keymap.set("n", "<leader>k", "<cmd>lnext<CR>zz")
vim.keymap.set("n", "<leader>j", "<cmd>lprev<CR>zz") vim.keymap.set("n", "<leader>j", "<cmd>lprev<CR>zz")
vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gi<Left><Left><Left>]]) vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gi<Left><Left><Left>]])
vim.keymap.set("n", "<leader>x", "<cmd>!chmod _x %<CR>", { silent = true}) vim.keymap.set("n", "<leader>x", "<cmd>!chmod _x %<CR>", { silent = true })
vim.keymap.set('n', '<leader>;', ':A<CR>', { desc = 'Alternate file' }) vim.keymap.set('n', '<leader>;', ':A<CR>', { desc = 'Alternate file' })
vim.keymap.set('n', '<leader>\\', function()
local path = vim.fn.expand('%:p')
local target
if path:find('/pos_loyalty_new/', 1, true) then
target = path:gsub('/pos_loyalty_new/', '/pos_loyalty/')
elseif path:find('/pos_loyalty/', 1, true) then
target = path:gsub('/pos_loyalty/', '/pos_loyalty_new/')
else
return vim.notify('Not in pos_loyalty or pos_loyalty_new', vim.log.levels.WARN)
end
vim.cmd('edit ' .. vim.fn.fnameescape(target))
end, { desc = 'Toggle pos_loyalty ↔ pos_loyalty_new' })
+7
View File
@@ -26,5 +26,12 @@ vim.opt.signcolumn = "yes"
vim.opt.isfname:append("@-@") vim.opt.isfname:append("@-@")
vim.opt.updatetime = 50 vim.opt.updatetime = 50
vim.opt.autoread = true
vim.api.nvim_create_autocmd({ "FocusGained", "BufEnter", "CursorHold" }, {
callback = function()
vim.cmd("checktime")
end,
})
vim.g.mapleader = " " vim.g.mapleader = " "
+39
View File
@@ -0,0 +1,39 @@
# AGENTS.md
Agent-agnostic guidance for any coding agent working in this repository. Keep all agent-agnostic instructions in this file. Agent-specific guidance lives in the agent's own file (e.g. `CLAUDE.md`).
## Repository purpose
Personal dotfiles repo. The working tree is structured to be cloned/symlinked at `$HOME` — the path `.config/nvim/` here corresponds to `~/.config/nvim/` on the user's machine. There is no build, test, or lint step; changes are validated by reloading Neovim.
`.gitignore` excludes `.config/nvim/lazy-lock.json` (lazy.nvim's plugin lockfile is not tracked).
## Neovim configuration architecture
Entry points and load order:
1. `.config/nvim/init.lua``require("wicked")`
2. `.config/nvim/lua/wicked/init.lua` requires, in order: `wicked.remap` (keymaps), `wicked.set` (options), `wicked.lazy` (plugin manager bootstrap + spec).
3. After `lazy.setup` runs, Neovim sources every file under `.config/nvim/after/plugin/*.lua` automatically (standard `after/` runtime path). Each of those files configures one plugin loaded by lazy.
This means: plugin **declarations** live in `lua/wicked/lazy.lua`, but plugin **configuration** (setup calls, keymaps, autocmds) lives in `after/plugin/<name>.lua`. When adding a plugin, both files usually need a change unless the plugin is configured inline via `opts`/`config` in the lazy spec.
DAP adapters are split out under `lua/dap/` (`dap-haskell.lua`, `dap-odoo.lua`, `dap-dotnet.lua`) and are required from `after/plugin/dap.lua`.
Leader key is `<Space>`, set in both `remap.lua` and `set.lua` (the duplicate in `set.lua` is intentional defensive ordering).
## Notable plugin choices
- **lazy.nvim** with `checker.enabled = true` (auto-checks for updates daily).
- **snacks.nvim** is used for picker/terminal/etc. — it replaced telescope (see commit `12db5d8`). Don't reintroduce telescope.
- **everforest** is the active colorscheme; nord is installed but not active.
- **codecompanion.nvim** pinned to `^18.0.0`.
- **roslyn.nvim** for C# LSP (separate from the standard `nvim-lspconfig` flow).
- **tidal.nvim** + **strudel.nvim** for live-coding music; tidal expects `ghci` at `~/.ghcup/bin/ghci` and a SuperDirt boot file at `~/.local/share/tidal/BootSuperDirt.scd`.
- **obsidian.nvim** workspace points at `~/notes`.
- **persistence.nvim** stores sessions under `stdpath("state")/sessions/`.
- Undo files live at `~/.vim/undodir` (set in `wicked/set.lua`), not the default location.
## Working in this repo
- To preview changes, reload Neovim or `:source` the affected file. There are no CI or test commands to run.
- `lazy-lock.json` is gitignored — don't try to commit it. Plugin version pinning happens via the spec in `lua/wicked/lazy.lua`.
+7
View File
@@ -0,0 +1,7 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
See [AGENTS.md](./AGENTS.md) for the repository overview, architecture, and working conventions. All agent-agnostic instructions belong in `AGENTS.md`. Only Claude-specific instructions or skill references belong in this file.
<!-- Add Claude-specific instructions or skill references below this line. -->
-68
View File
@@ -1,68 +0,0 @@
#!/bin/bash
echo "----- Cloning homefull-api -----"
if [ -d "$HOME/projects/homefull-api" ]; then
echo "[Skipped] homefull-api already exists"
else
git clone https://github.com/macocianradu/homefull-api.git\
~/projects/homefull-api
fi
echo "----- Cloning homefull-gui -----"
if [ -d "$HOME/projects/homefull-gui" ]; then
echo "[Skipped] homefull-gui already exists"
else
git clone https://github.com/macocianradu/homefull-gui.git\
~/projects/homefull-gui
fi
if [[ "$OSTYPE" == "linux"* ]]; then
echo "----- Linux-Gnu detected -----"
nvim_path="/opt/nvim-linux64"
echo "----- Downloading NVIM -----"
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
sudo rm -rf /opt/nvim
echo "Copying NVIM to /opt/nvim-linux64"
sudo tar -C /opt -xzf nvim-linux64.tar.gz
echo "Adding NVIM to PATH in ./bashrc"
echo "export PATH="\$PATH:$nvim_path/bin"" >> ~/.bashrc
echo "NVIM added to path, run '. ~/.bashrc' to reload PATH variable"
elif [[ "$OSTYPE" == "darwin"* ]]; then
echo "----- OSX detected -----"
nvim_path="~/Applications/nvim"
if [ -d "$HOME/Applications/nvim" ]; then
echo "[Skipped] NVIM already installed"
else
echo "----- Downloading nvim -----"
curl -LO https://github.com/neovim/neovim/releases/download/nightly/nvim-macos-arm64.tar.gz
tar xzf nvim-macos-arm64.tar.gz
mv nvim-macos-arm64 $nvim_path
fi
fi
if [[ ! -d "$HOME/.local/share/nvim/roslyn" ]] then
echo "----- Roslyn LS not detected: Downloading now -----"
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
ls_url="https://zaxvsblobprodwus215.vsblob.vsassets.io/b-63b6279ad2f14bc3a21cdb7614e92831/5787C047B250801723E628CEF9CA582F82C848FE406E4553BA02BF5ECA870EBD00.blob?sv=2019-07-07&sr=b&si=1&sig=L9sr005TS6IonkYAeB7KYh7kW9CnWNr9MAqNu4ypEUo%3D&spr=https&se=2024-08-19T00%3A25%3A13Z&rscl=x-e2eid-ec16adad-34c8456c-80536072-32aeec7d-session-ec16adad-34c8456c-80536072-32aeec7d&rscd=attachment%3B%20filename%3D%22Microsoft.CodeAnalysis.LanguageServer.linux-x64.4.12.0-2.24417.1.nupkg%22&P1=1724037911&P2=1&P3=2&P4=gWMe2EcOpfH3DR3WcrRHHNy7Tdsz8N7QuAZdgHUJfyk%3d"
elif [[ "$OSTYPE" == "darwin"* ]]; then
ls_url="https://etjvsblobprodwus2172.vsblob.vsassets.io/b-63b6279ad2f14bc3a21cdb7614e92831/270B5B41FCC924B78FFAAEC2E2F6623DDEE782E2EB8AD71C9661A7144E9B399C00.blob?sv=2019-07-07&sr=b&si=1&sig=Y2Eil5keeY2ZyHlm%2FOZPZz%2FfkZhWgII31wn0q0Kuu0g%3D&spr=https&se=2024-08-19T00%3A42%3A54Z&rscl=x-e2eid-0ae75aa5-b81e4f13-bef4006c-4791577b-session-0ae75aa5-b81e4f13-bef4006c-4791577b&rscd=attachment%3B%20filename%3D%22Microsoft.CodeAnalysis.LanguageServer.osx-arm64.4.12.0-2.24417.1.nupkg%22&P1=1724038971&P2=1&P3=2&P4=4%2b936oMTgkM4TFkxnmVVzhCHlRl4L3LpTq2trVyzSMQ%3d"
mkdir temp
curl $ls_url\
-o temp/language_server.nupkg
cd temp
unzip temp/language_server.nupkg
mv temp/content/LanguageServer/linux-x64 $HOME/.local/share/nvim/roslyn
rm -rf temp
fi
echo "----- Copying NVIM configuration -----"
if [ ! -d "$HOME/.config" ]; then
echo ".config folder not found. Creating one"
mkdir ~/.config
fi
ln -s ~/projects/setup/.config/nvim ~/.config/
if [ ! -d "$HOME/.vim" ]; then
echo ".vim folder not found. Creating one"
mkdir ~/.vim
fi
ln -s ~/projects/setup/.vim/undodir ~/.vim/