Compare commits

..

No commits in common. "dc126a49d6df2482c80cc701ae194ee609be5467" and "7a4712c057270ca54916e7fcbb6e87d09cd52c3b" have entirely different histories.

4 changed files with 60 additions and 118 deletions

View file

@ -30,7 +30,6 @@
go go
gopls gopls
gotools gotools
harper
lua-language-server lua-language-server
nil nil
nixd nixd
@ -43,7 +42,6 @@
shellcheck shellcheck
shfmt shfmt
stylua stylua
superhtml
vscode-langservers-extracted vscode-langservers-extracted
]; ];
@ -61,7 +59,7 @@
} }
{ {
plugin = pkgs.blink-cmp; plugin = blink-cmp;
type = "lua"; type = "lua";
config = '' config = ''
require'blink-cmp'.setup({ require'blink-cmp'.setup({
@ -70,31 +68,27 @@
["<PageDown>"] = { "scroll_documentation_down" }, ["<PageDown>"] = { "scroll_documentation_down" },
["<PageUp>"] = { "scroll_documentation_up" }, ["<PageUp>"] = { "scroll_documentation_up" },
}, },
completion = { trigger = {
accept = { completion = {
auto_brackets = { show_in_snippet = true,
enabled = true,
},
}, },
signature_help = {
documentation = {
auto_show = true,
auto_show_delay_ms = 800,
window = {
border = 'rounded',
},
ghost_text = {
enabled = true,
},
},
signature = {
enabled = true, enabled = true,
window = {
border = 'rounded',
},
}, },
},
windows = {
autocomplete = {
border = 'none',
selection = 'preselect',
},
documentation = {
border = 'rounded',
auto_show = false,
auto_show_delay_ms = 800,
},
signature_help = {
border = 'rounded',
},
}, },
}) })
''; '';
@ -106,8 +100,8 @@
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "saghen"; owner = "saghen";
repo = "blink.compat"; repo = "blink.compat";
rev = "78f3f7187ff4a1444e952548c556d936da8f72fc"; # v2.1.2 rev = "cd2d3a040b76ad0eeab9a3bba48bc4c2b9d703bf"; # v1.0.2
hash = "sha256-aqHDwrzPOyOw9UbJlQX10/cVQwNHg4v6i9jSm+pNKZc="; hash = "sha256-4uoehv/qe74IivgXc69ekYLod3Zo+oPUvXJHtt4wc2U=";
}; };
}; };
type = "lua"; type = "lua";

View file

@ -1,50 +1,44 @@
local configs = require('lspconfig.configs')
local lspconfig = require("lspconfig") local lspconfig = require("lspconfig")
local capabilities = vim.lsp.protocol.make_client_capabilities()
local servers = { local servers = {
cssls = {}, 'gopls',
gopls = {}, 'ts_ls',
html = {},
jsonls = {},
superhtml = {},
ts_ls = {},
harper_ls = {
filetypes = {
"asciidoc", "c", "gitcommit", "go", "html", "javascript", "just", "lua", "markdown",
"nix", "python", "ruby", "rust", "text", "toml", "typescript", "zig",
}
},
lua_ls = {
settings = {
Lua = {
runtime = {
version = "LuaJIT",
path = vim.split(package.path, ";"),
},
diagnostics = { globals = { "vim", "hs" } },
workspace = {
library = {
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
[vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true,
},
},
},
},
},
nixd = {
cmd = { "nixd" },
settings = {
nixd = {
nixpkgs = { expr = "import <nixpkgs> { }" },
formatting = { command = { "nixfmt" } },
options = {},
},
},
},
} }
for server, config in pairs(servers) do for _, ls in ipairs(servers) do
config.capabilities = require('blink.cmp').get_lsp_capabilities(config.capabilities) lspconfig[ls].setup {
lspconfig[server].setup(config) capabilities = capabilities,
}
end end
lspconfig.nixd.setup({
capabilities = capabilities,
cmd = { "nixd" },
settings = {
nixd = {
nixpkgs = { expr = "import <nixpkgs> { }" },
formatting = { command = { "nixfmt" } },
options = {},
},
},
})
lspconfig.lua_ls.setup({
capabilities = capabilities,
settings = {
Lua = {
runtime = {
version = "LuaJIT",
path = vim.split(package.path, ";"),
},
diagnostics = { globals = { "vim", "hs" } },
workspace = {
library = {
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
[vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true,
},
},
},
},
})

View file

@ -1,45 +0,0 @@
{
lib,
rustPlatform,
fetchFromGitHub,
stdenv,
vimUtils,
}:
let
version = "0.7.3";
src = fetchFromGitHub {
owner = "Saghen";
repo = "blink.cmp";
rev = "refs/tags/v${version}";
hash = "sha256-nxiODLKgGeXzN5sqkLWU0PcsuSSB1scSzTC5qyCxLCI=";
};
libExt = if stdenv.hostPlatform.isDarwin then "dylib" else "so";
blink-fuzzy-lib = rustPlatform.buildRustPackage {
inherit version src;
pname = "blink-fuzzy-lib";
env = {
# TODO: remove this if plugin stops using nightly rust
RUSTC_BOOTSTRAP = true;
};
useFetchCargoVendor = true;
cargoHash = "sha256-XXI2jEoD6XbFNk3O8B6+aLzl1ZcJq1VinQXb+AOw8Rw=";
};
in
vimUtils.buildVimPlugin {
pname = "blink-cmp";
inherit version src;
preInstall = ''
mkdir -p target/release
ln -s ${blink-fuzzy-lib}/lib/libblink_cmp_fuzzy.${libExt} target/release/libblink_cmp_fuzzy.${libExt}
'';
meta = {
description = "Performant, batteries-included completion plugin for Neovim";
homepage = "https://github.com/saghen/blink.cmp";
maintainers = with lib.maintainers; [
balssh
redxtech
];
};
doInstallCheck = true;
nvimRequireCheck = "blink-cmp";
}

View file

@ -1,5 +1,4 @@
pkgs: { pkgs: {
blink-cmp = pkgs.callPackage ./blink-cmp { };
gnome-ssh-askpass4 = pkgs.callPackage ./gnome-ssh-askpass4 { }; gnome-ssh-askpass4 = pkgs.callPackage ./gnome-ssh-askpass4 { };
jujutsu-openssh = pkgs.callPackage ./jujutsu-openssh { }; jujutsu-openssh = pkgs.callPackage ./jujutsu-openssh { };
lazyjj = pkgs.callPackage ./lazyjj { }; lazyjj = pkgs.callPackage ./lazyjj { };