Compare commits

..

No commits in common. "a90219e7cd1f914d70c4356a88b200214282d602" and "63bd48abf6b99f718e9ec6e23b0b9f16353ebd0c" have entirely different histories.

3 changed files with 21 additions and 54 deletions

View file

@ -505,6 +505,22 @@ in
format = lspkind.cmp_format({
mode = 'symbol_text',
maxwidth = 50,
-- old format
-- format = function(entry, vim_item)
-- -- fancy icons and a name of kind
-- vim_item.kind = require("lspkind").presets.default[vim_item.kind] ..
-- " " .. vim_item.kind
-- -- set a name for each source
-- vim_item.menu = ({
-- buffer = "[Buffer]",
-- nvim_lsp = "[LSP]",
-- look = "[Look]",
-- path = "[Path]",
-- spell = "[Spell]",
-- calc = "[Calc]",
-- })[entry.source.name]
-- return vim_item
-- end
})
},
mapping = {
@ -609,19 +625,10 @@ in
},
})
capabilities = require('cmp_nvim_lsp').default_capabilities()
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
-- fennel-ls is bleeding edge
local lspconfig = require('lspconfig')
require("lspconfig.configs")["fennel-ls"] = {
default_config = {
cmd = {"fennel-ls"},
filetypes = {"fennel"},
root_dir = function(dir) return lspconfig.util.find_git_ancestor(dir) end,
settings = {}
}
}
local servers = { 'clojure_lsp', 'terraform_lsp', 'zls', 'pyright', 'rust_analyzer', 'tsserver', 'sumneko_lua' }
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
@ -633,20 +640,12 @@ in
}
end
-- rnix doesn't support gps
lspconfig['rnix'].setup {
require('lspconfig').rnix.setup {
on_attach = function(client, bufnr)
format.on_attach(client)
end,
capabilities = capabilities,
}
-- fennel-ls doesn't support gps
lspconfig['fennel-ls'].setup {
on_attach = function(client, bufnr)
format.on_attach(client)
end,
capabilities = capabilities,
}
-- deprecated pylsp
-- require('lspconfig').pylsp.setup {
-- on_attach = function(client, bufnr)
@ -865,7 +864,6 @@ in
nodePackages.typescript
nodePackages.typescript-language-server
sumneko-lua-language-server
fennel-ls
];
plugins = with pkgs.vimPlugins // customPlugins; [

View file

@ -4,5 +4,5 @@
{ pkgs ? (import ../nixpkgs.nix) { } }: {
plymouth-themes = pkgs.callPackage ./plymouth.nix { };
tic-80 = pkgs.callPackage ./tic-80.nix { };
fennel-ls = pkgs.callPackage ./fennel-ls.nix { };
}

View file

@ -1,31 +0,0 @@
# Stolen from: https://gist.github.com/jjwatt/c83c02e6903c8ffaf546fe5eb27e7d25?permalink_comment_id=3305141#gistcomment-3305141
{ pkgs, ... }:
pkgs.stdenv.mkDerivation rec {
name = "fennel-ls";
src = pkgs.fetchgit {
url = "https://git.sr.ht/~xerool/fennel-ls";
rev = "70e434839fdf9fad7512118d3f72e38aa8d3ca9f";
sha256 = "mYOAlSCixlWzykPeLcGyTzWksDAJjblkYwI0k1GuYvE=";
};
buildInputs = with pkgs; [
lua
fennel
];
configurePhase = ''
echo [DIRECTORY] $(pwd)
sed -i 's/\.\/fennel/fennel/' Makefile
# cd build/
# cmake ..
'';
buildPhase = ''
make -j4
'';
installPhase = ''
mkdir -p $out/bin
chmod a+x fennel-ls
cp -v fennel-ls $out/bin
'';
}