mirror of
https://github.com/iofq/nvim.nix.git
synced 2026-01-23 08:55:16 -06:00
no more copilot
This commit is contained in:
parent
d360f0e701
commit
5f5ac17935
10 changed files with 78 additions and 141 deletions
17
flake.lock
generated
17
flake.lock
generated
|
|
@ -278,22 +278,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mini-nvim": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1750602124,
|
|
||||||
"narHash": "sha256-cfgANg0vRJg31x+BiSfYhwBSyQnYt/aRDx6+BaS0YYY=",
|
|
||||||
"owner": "echasnovski",
|
|
||||||
"repo": "mini.nvim",
|
|
||||||
"rev": "1b32a3f61f1f649cadc748bd4b7a32b4b4785d29",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "echasnovski",
|
|
||||||
"repo": "mini.nvim",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"neovim-nightly-overlay": {
|
"neovim-nightly-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": "flake-compat_2",
|
||||||
|
|
@ -398,7 +382,6 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"gen-luarc": "gen-luarc",
|
"gen-luarc": "gen-luarc",
|
||||||
"mini-nvim": "mini-nvim",
|
|
||||||
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
18
flake.nix
18
flake.nix
|
|
@ -9,10 +9,6 @@
|
||||||
url = "github:mrcjkb/nix-gen-luarc-json";
|
url = "github:mrcjkb/nix-gen-luarc-json";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
mini-nvim = {
|
|
||||||
url = "github:echasnovski/mini.nvim";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
# Add bleeding-edge plugins here.
|
# Add bleeding-edge plugins here.
|
||||||
# They can be updated with `nix flake update` (make sure to commit the generated flake.lock)
|
# They can be updated with `nix flake update` (make sure to commit the generated flake.lock)
|
||||||
# wf-nvim = {
|
# wf-nvim = {
|
||||||
|
|
@ -20,22 +16,19 @@
|
||||||
# flake = false;
|
# flake = false;
|
||||||
# };
|
# };
|
||||||
};
|
};
|
||||||
outputs =
|
outputs = inputs @ {
|
||||||
inputs@{
|
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
flake-utils,
|
flake-utils,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
systems = builtins.attrNames nixpkgs.legacyPackages;
|
systems = builtins.attrNames nixpkgs.legacyPackages;
|
||||||
|
|
||||||
# This is where the Neovim derivation is built.
|
# This is where the Neovim derivation is built.
|
||||||
neovim-overlay = import ./nix/neovim-overlay.nix { inherit inputs; };
|
neovim-overlay = import ./nix/neovim-overlay.nix {inherit inputs;};
|
||||||
in
|
in
|
||||||
flake-utils.lib.eachSystem systems (
|
flake-utils.lib.eachSystem systems (
|
||||||
system:
|
system: let
|
||||||
let
|
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
|
|
@ -64,8 +57,7 @@
|
||||||
ln -Tfns $PWD/nvim ~/.config/nvim-dev
|
ln -Tfns $PWD/nvim ~/.config/nvim-dev
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
packages = rec {
|
packages = rec {
|
||||||
default = nvim;
|
default = nvim;
|
||||||
nvim = pkgs.nvim-pkg;
|
nvim = pkgs.nvim-pkg;
|
||||||
|
|
|
||||||
|
|
@ -1,32 +1,25 @@
|
||||||
# This overlay, when applied to nixpkgs, adds the final neovim derivation to nixpkgs.
|
# This overlay, when applied to nixpkgs, adds the final neovim derivation to nixpkgs.
|
||||||
{ inputs }:
|
{inputs}: final: prev:
|
||||||
final: prev:
|
with final.pkgs.lib; let
|
||||||
with final.pkgs.lib;
|
|
||||||
let
|
|
||||||
pkgs = final;
|
pkgs = final;
|
||||||
pkgs-wrapNeovim = prev;
|
pkgs-wrapNeovim = prev;
|
||||||
|
|
||||||
mkNvimPlugin =
|
mkNvimPlugin = src: pname:
|
||||||
src: pname:
|
|
||||||
pkgs.vimUtils.buildVimPlugin {
|
pkgs.vimUtils.buildVimPlugin {
|
||||||
inherit pname src;
|
inherit pname src;
|
||||||
version = src.lastModifiedDate;
|
version = src.lastModifiedDate;
|
||||||
};
|
};
|
||||||
mkNeovim = pkgs.callPackage ./mkNeovim.nix { inherit pkgs-wrapNeovim; };
|
mkNeovim = pkgs.callPackage ./mkNeovim.nix {inherit pkgs-wrapNeovim;};
|
||||||
|
|
||||||
mini-nvim-git = mkNvimPlugin inputs.mini-nvim "mini.nvim";
|
|
||||||
|
|
||||||
all-plugins = with pkgs.vimPlugins; [
|
all-plugins = with pkgs.vimPlugins; [
|
||||||
blink-cmp
|
blink-cmp
|
||||||
blink-copilot
|
|
||||||
blink-ripgrep-nvim
|
blink-ripgrep-nvim
|
||||||
conform-nvim
|
conform-nvim
|
||||||
copilot-lua
|
|
||||||
diffview-nvim
|
diffview-nvim
|
||||||
eyeliner-nvim
|
eyeliner-nvim
|
||||||
friendly-snippets
|
friendly-snippets
|
||||||
lazy-nvim
|
lazy-nvim
|
||||||
mini-nvim-git
|
mini-nvim
|
||||||
nightfox-nvim
|
nightfox-nvim
|
||||||
nvim-lint
|
nvim-lint
|
||||||
nvim-lspconfig
|
nvim-lspconfig
|
||||||
|
|
@ -63,8 +56,7 @@ let
|
||||||
jujutsu
|
jujutsu
|
||||||
fd
|
fd
|
||||||
];
|
];
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
nvim-pkg = mkNeovim {
|
nvim-pkg = mkNeovim {
|
||||||
plugins = all-plugins;
|
plugins = all-plugins;
|
||||||
appName = "nvim";
|
appName = "nvim";
|
||||||
|
|
|
||||||
32
nvim/lsp/gopls.lua
Normal file
32
nvim/lsp/gopls.lua
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
return {
|
||||||
|
settings = {
|
||||||
|
gopls = {
|
||||||
|
gofumpt = true,
|
||||||
|
codelenses = {
|
||||||
|
gc_details = true,
|
||||||
|
test = true,
|
||||||
|
},
|
||||||
|
analyses = {
|
||||||
|
unusedvariable = true,
|
||||||
|
unusedparams = true,
|
||||||
|
useany = true,
|
||||||
|
unusedwrite = true,
|
||||||
|
nilness = true,
|
||||||
|
shadow = true,
|
||||||
|
},
|
||||||
|
hints = {
|
||||||
|
assignVariableTypes = true,
|
||||||
|
compositeLiteralFields = true,
|
||||||
|
compositeLiteralTypes = true,
|
||||||
|
constantValues = true,
|
||||||
|
functionTypeParameters = true,
|
||||||
|
rangeVariableTypes = true,
|
||||||
|
parameterNames = true,
|
||||||
|
},
|
||||||
|
usePlaceholders = true,
|
||||||
|
staticcheck = true,
|
||||||
|
completeUnimported = true,
|
||||||
|
semanticTokens = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
23
nvim/lsp/lua_ls.lua
Normal file
23
nvim/lsp/lua_ls.lua
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
return {
|
||||||
|
on_init = function(client)
|
||||||
|
local path = client.workspace_folders[1].name
|
||||||
|
if vim.loop.fs_stat(path .. '/.luarc.json') or vim.loop.fs_stat(path .. '/.luarc.jsonc') then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
||||||
|
runtime = {
|
||||||
|
version = 'LuaJIT',
|
||||||
|
},
|
||||||
|
workspace = {
|
||||||
|
checkThirdParty = false,
|
||||||
|
library = {
|
||||||
|
vim.env.VIMRUNTIME,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
settings = {
|
||||||
|
Lua = {},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -87,7 +87,6 @@ vim.keymap.set('n', '<S-h>', vim.cmd.bprev, { noremap = true, silent = true })
|
||||||
vim.keymap.set('v', '<', '<gv')
|
vim.keymap.set('v', '<', '<gv')
|
||||||
vim.keymap.set('v', '>', '>gv')
|
vim.keymap.set('v', '>', '>gv')
|
||||||
vim.keymap.set({ 'v', 'n' }, 'q:', '<nop>')
|
vim.keymap.set({ 'v', 'n' }, 'q:', '<nop>')
|
||||||
vim.keymap.set({ 'n', 'v' }, '<C-b>', '<C-a>') -- usually have C-a mapped to tmux
|
|
||||||
|
|
||||||
-- resize splits if window got resized
|
-- resize splits if window got resized
|
||||||
vim.api.nvim_create_autocmd({ 'VimResized' }, {
|
vim.api.nvim_create_autocmd({ 'VimResized' }, {
|
||||||
|
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
'zbirenbaum/copilot.lua',
|
|
||||||
cmd = 'Copilot',
|
|
||||||
opts = {
|
|
||||||
panel = {
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
suggestion = {
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -4,7 +4,6 @@ return {
|
||||||
event = 'VeryLazy',
|
event = 'VeryLazy',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'mikavilpas/blink-ripgrep.nvim',
|
'mikavilpas/blink-ripgrep.nvim',
|
||||||
'fang2hou/blink-copilot',
|
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
enabled = function()
|
enabled = function()
|
||||||
|
|
@ -24,7 +23,6 @@ return {
|
||||||
'snippets',
|
'snippets',
|
||||||
'omni',
|
'omni',
|
||||||
'ripgrep',
|
'ripgrep',
|
||||||
'copilot',
|
|
||||||
},
|
},
|
||||||
providers = {
|
providers = {
|
||||||
snippets = {
|
snippets = {
|
||||||
|
|
@ -36,20 +34,6 @@ return {
|
||||||
score_offset = -30,
|
score_offset = -30,
|
||||||
async = true,
|
async = true,
|
||||||
},
|
},
|
||||||
copilot = {
|
|
||||||
module = 'blink-copilot',
|
|
||||||
name = 'Copilot',
|
|
||||||
score_offset = 10,
|
|
||||||
async = true,
|
|
||||||
opts = {
|
|
||||||
max_completions = 2,
|
|
||||||
debounce = 500,
|
|
||||||
auto_refresh = {
|
|
||||||
backward = false,
|
|
||||||
forward = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
cmdline = {
|
cmdline = {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,8 @@ return {
|
||||||
opts = {
|
opts = {
|
||||||
pinned = true,
|
pinned = true,
|
||||||
focus = true,
|
focus = true,
|
||||||
auto_jump = true,
|
follow = false,
|
||||||
|
auto_close = false,
|
||||||
win = {
|
win = {
|
||||||
size = 0.25,
|
size = 0.25,
|
||||||
position = 'right',
|
position = 'right',
|
||||||
|
|
@ -29,62 +30,6 @@ return {
|
||||||
'saghen/blink.cmp',
|
'saghen/blink.cmp',
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
vim.lsp.config('gopls', {
|
|
||||||
settings = {
|
|
||||||
gopls = {
|
|
||||||
gofumpt = true,
|
|
||||||
codelenses = {
|
|
||||||
gc_details = true,
|
|
||||||
test = true,
|
|
||||||
},
|
|
||||||
analyses = {
|
|
||||||
unusedvariable = true,
|
|
||||||
unusedparams = true,
|
|
||||||
useany = true,
|
|
||||||
unusedwrite = true,
|
|
||||||
nilness = true,
|
|
||||||
shadow = true,
|
|
||||||
},
|
|
||||||
hints = {
|
|
||||||
assignVariableTypes = true,
|
|
||||||
compositeLiteralFields = true,
|
|
||||||
compositeLiteralTypes = true,
|
|
||||||
constantValues = true,
|
|
||||||
functionTypeParameters = true,
|
|
||||||
rangeVariableTypes = true,
|
|
||||||
parameterNames = true,
|
|
||||||
},
|
|
||||||
usePlaceholders = true,
|
|
||||||
staticcheck = true,
|
|
||||||
completeUnimported = true,
|
|
||||||
semanticTokens = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
vim.lsp.config('lua_ls', {
|
|
||||||
on_init = function(client)
|
|
||||||
local path = client.workspace_folders[1].name
|
|
||||||
if vim.loop.fs_stat(path .. '/.luarc.json') or vim.loop.fs_stat(path .. '/.luarc.jsonc') then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
|
||||||
runtime = {
|
|
||||||
version = 'LuaJIT',
|
|
||||||
},
|
|
||||||
workspace = {
|
|
||||||
checkThirdParty = false,
|
|
||||||
library = {
|
|
||||||
vim.env.VIMRUNTIME,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
settings = {
|
|
||||||
Lua = {},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.lsp.enable {
|
vim.lsp.enable {
|
||||||
'nil_ls',
|
'nil_ls',
|
||||||
'phpactor',
|
'phpactor',
|
||||||
|
|
@ -207,6 +152,9 @@ return {
|
||||||
go = { 'golangcilint' },
|
go = { 'golangcilint' },
|
||||||
ruby = { 'rubocop' },
|
ruby = { 'rubocop' },
|
||||||
fish = { 'fish' },
|
fish = { 'fish' },
|
||||||
|
bash = { 'bash' },
|
||||||
|
nix = { 'nix' },
|
||||||
|
php = { 'php' },
|
||||||
}
|
}
|
||||||
vim.api.nvim_command('au BufWritePost * lua require("lint").try_lint()')
|
vim.api.nvim_command('au BufWritePost * lua require("lint").try_lint()')
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
|
|
@ -9,14 +9,12 @@ return {
|
||||||
opts = {
|
opts = {
|
||||||
bigfile = { enabled = true },
|
bigfile = { enabled = true },
|
||||||
bufdelete = { enabled = true },
|
bufdelete = { enabled = true },
|
||||||
dim = { enabled = true },
|
|
||||||
quickfile = { enabled = true },
|
quickfile = { enabled = true },
|
||||||
notifier = { enabled = true },
|
notifier = { enabled = true },
|
||||||
terminal = { enabled = true },
|
terminal = { enabled = true },
|
||||||
indent = { enabled = true },
|
indent = { enabled = true },
|
||||||
input = { enabled = true },
|
input = { enabled = true },
|
||||||
words = { enabled = true },
|
words = { enabled = true },
|
||||||
scope = { enabled = true },
|
|
||||||
picker = {
|
picker = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
matcher = { frecency = true },
|
matcher = { frecency = true },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue