forked from colonelpanic/dotfiles
[Emacs] Only enable lsp-haskell when hie binary exists
This commit is contained in:
parent
6d351ccf4c
commit
b01be33386
@ -1,9 +1,36 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
function min {
|
||||||
|
[ $1 -le $2 ] && echo "$1" || echo "$2"
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_exe_dir {
|
||||||
|
# XXX: This exists because calling in to stack is kind of slow with nix
|
||||||
|
# integration enabled, even when just using it to get a path.
|
||||||
|
if [ -e ./.cached-stack-install-path ]; then
|
||||||
|
cat .cached-stack-install-path
|
||||||
|
else
|
||||||
|
stack path --local-install-root
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function do_rebuild {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
SRC_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SRC_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
EXE_NAME=imalison-xmonad
|
EXE_NAME=imalison-xmonad
|
||||||
|
EXE_LOCATION=$(get_exe_dir)/bin/$EXE_NAME
|
||||||
output_file=$1; shift
|
output_file=$1; shift
|
||||||
|
|
||||||
|
if [ -e ./.cached-stack-install-path ]; then
|
||||||
|
last_built=$(stat -c '%Y' $EXE_LOCATION)
|
||||||
|
xmonad_modified=$(stat -c '%Y' ./xmonad.hs)
|
||||||
|
|
||||||
|
[ $last_built -lt $xmonad_modified ] && stack install
|
||||||
|
else
|
||||||
stack install
|
stack install
|
||||||
cp -uf $(stack path --local-install-root)/bin/$EXE_NAME $output_file
|
fi
|
||||||
|
|
||||||
|
cp -uf $EXE_LOCATION $output_file
|
||||||
|
@ -9,3 +9,12 @@ packages:
|
|||||||
extra-deps:
|
extra-deps:
|
||||||
- X11-xft-0.3.1
|
- X11-xft-0.3.1
|
||||||
resolver: lts-11.7
|
resolver: lts-11.7
|
||||||
|
nix:
|
||||||
|
packages:
|
||||||
|
- pkgconfig
|
||||||
|
- x11
|
||||||
|
- xorg.libX11
|
||||||
|
- xorg.libXext
|
||||||
|
- xorg.libXinerama
|
||||||
|
- xorg.libXrandr
|
||||||
|
- xorg.libXrender
|
||||||
|
@ -2774,7 +2774,8 @@ The following is taken from [[https://github.com/syl20bnr/spacemacs/blob/a650877
|
|||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package lsp-haskell
|
(use-package lsp-haskell
|
||||||
:config
|
:config
|
||||||
(add-hook 'haskell-mode-hook 'lsp-haskell-enable))
|
(when (executable-find "hie")
|
||||||
|
(add-hook 'haskell-mode-hook 'lsp-haskell-enable)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
**** intero
|
**** intero
|
||||||
Intero seems to be causing hangs, so it has been disabled
|
Intero seems to be causing hangs, so it has been disabled
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
# -*- mode:sh
|
|
||||||
|
|
||||||
if command_exists "imalison-taffybar"; then
|
|
||||||
imalison-xmonad "$@"
|
|
||||||
else
|
|
||||||
# Move .lib/bin to the end of PATH so that this script is not called again
|
|
||||||
add_to_path "$HOME/.lib/bin" --after
|
|
||||||
xmonad "$@"
|
|
||||||
fi
|
|
Loading…
Reference in New Issue
Block a user