Compare commits

..

No commits in common. "8a87841d6161777630e10b9369ec2574f2d8b809" and "b254617843a40062fa24c45a66ca1d799c1d9859" have entirely different histories.

3 changed files with 11 additions and 37 deletions

View File

@ -1711,11 +1711,11 @@
},
"unstable": {
"locked": {
"lastModified": 1751349533,
"narHash": "sha256-5XRh0mB06/7WYDLu9ZXsx1GhyvvNVZDtPyg34sUCLJs=",
"lastModified": 1747312588,
"narHash": "sha256-MmJvj6mlWzeRwKGLcwmZpKaOPZ5nJb/6al5CXqJsgjo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "bdfd0f2afcf764e531d0960c821ab070a6174b15",
"rev": "b1bebd0fe266bbd1820019612ead889e96a8fa2d",
"type": "github"
},
"original": {

View File

@ -49,6 +49,7 @@
url = "github:terrastruct/d2-vim";
flake = false;
};
# We need to pin to this version of treesitter because it breaks after this revision
roslyn-lsp = {
url = "github:zaphar/roslyn.nvim/main";
flake = false;
@ -116,13 +117,15 @@
nixpkgs.overlays = [
(final: prev: {
lorri = unstablePkgs.lorri;
avante-nvim = unstablePkgs.vimPlugins.avante-nvim;
copilot-lua = unstablePkgs.vimPlugins.copilot-lua;
})
];
programs = with unstablePkgs; {
programs = with pkgs; {
neovim.enable = true;
neovim.vimAlias = true;
neovim.viAlias = true;
neovim.package = unstablePkgs.neovim-unwrapped;
#neovim.package = pkgs.custom-neovim;
neovim.configure = {
customRC = "lua << EOF
${builtins.readFile ./init.lua}

View File

@ -20,10 +20,6 @@ vim.opt.fileformats = "unix,dos"
-- Recommended by Avante docs
-- views can only be fully collapsed with the global statusline
vim.opt.laststatus = 3
-- formatexpr defaulted to the lsp provider by default recently
-- which breaks `gq` and company paragraph formatting in non lsp
-- contexts.
vim.opt.formatexpr = ""
vim.g.BASH_AuthorName = 'Jeremy Wall'
vim.g.BASH_AuthorRef = 'jw'
@ -260,10 +256,6 @@ vim.api.nvim_create_autocmd('LspAttach', {
if client and client.server_capabilities.codelens then
vim.lsp.codelens.refresh()
end
-- formatexpr defaulted to the lsp provider by default recently
-- which breaks `gq` and company paragraph formatting in non lsp
-- contexts.
vim.bo[args.buf].formatexpr = ""
end,
})
@ -283,6 +275,7 @@ vim.api.nvim_create_autocmd({ 'BufEnter', 'InsertLeave', 'CursorHold' }, {
-- LSP Diagnostics Options Setup
vim.diagnostic.config({
virtual_text = false,
signs = true,
update_in_insert = true,
underline = true,
severity_sort = false,
@ -714,7 +707,7 @@ function get_server_list_prompt(hub_instance)
for _, server in ipairs(servers) do
mcp_tool_prompt = mcp_tool_prompt .. "## server name: `" .. server.name .. "`\n\n"
if server.capabilities and server.capabilities.tools and #server.capabilities.tools > 0 then
if server.capabilities.tools and #server.capabilities.tools > 0 then
mcp_tool_prompt = mcp_tool_prompt .. "Available tools:\n\n"
for _, tool in ipairs(server.capabilities.tools) do
mcp_tool_prompt = mcp_tool_prompt .. "- tool name: `" .. tool.name .. "`\n"
@ -744,29 +737,7 @@ end
vim.keymap.set("n", "<Leader>ab", function() require('avante').get().file_selector:add_buffer_files() end)
vim.keymap.set("n", "<Leader>af", function() require('avante').get().file_selector:add_current_buffer() end)
get_root_dir = function()
-- First try to get the root path from LSP
local bufnr = vim.api.nvim_get_current_buf()
local clients = vim.lsp.get_clients({ bufnr = bufnr })
-- Check if we have an active LSP client with a root_dir
for _, client in ipairs(clients) do
if client.config and client.config.root_dir then
return client.config.root_dir
end
end
-- Fall back to file-based detection
local root_file = vim.fs.find(function(name, path)
return name:match('(pyproject.toml|.sln|Cargo.toml|.git)$')
end, { upward = true })[1]
return root_file and vim.fs.dirname(root_file) or vim.fn.getcwd()
end
require('copilot').setup({
root_dir = get_root_dir,
})
require('copilot').setup()
require('avante').setup({
provider = "claude",