From 33b07ce43e23574258f0324a988a24b73b6dbadd Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Tue, 12 Apr 2022 16:08:50 +0300 Subject: [PATCH] feat(nix/home): add haskel feat(prog/nvim): support haskel lsp --- nix/home.nix | 6 ++++++ programs/nvim/init.vim | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/nix/home.nix b/nix/home.nix index b438af9..2cbb1e9 100644 --- a/nix/home.nix +++ b/nix/home.nix @@ -122,6 +122,7 @@ in }; initExtraFirst = '' + # nix if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]; then source $HOME/.nix-profile/etc/profile.d/nix.sh; fi @@ -129,6 +130,11 @@ in source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh export NIX_PATH=$HOME/.nix-defexpr/channels''${NIX_PATH:+:$NIX_PATH} + + # ghcup + if [ -f "$HOME/.ghcup/env" ]; then + source "$HOME/.ghcup/env" + fi ''; }; diff --git a/programs/nvim/init.vim b/programs/nvim/init.vim index 9af0e7d..404c50d 100644 --- a/programs/nvim/init.vim +++ b/programs/nvim/init.vim @@ -104,6 +104,15 @@ let g:NERDTreeGitStatusIndicatorMapCustom = { let g:lsp_preview_max_width = 60 let g:lsp_diagnostics_float_cursor = 1 +" if (executable('haskell-language-server-wrapper')) +" echom "Haskell lsp installed" +" au User lsp_setup call lsp#register_server({ +" \ 'name': 'haskell-language-server-wrapper', +" \ 'cmd': {server_info->['haskell-language-server-wrapper', 'lsp']}, +" \ 'whitelist': ['haskell'], +" \ }) +" endif + function! s:on_lsp_buffer_enabled() abort setlocal omnifunc=lsp#complete if exists('+tagfunc') | setlocal tagfunc=lsp#tagfunc | endif