haskell-language-server should be built for the specific GHC version it
will be used with. So, usually you download a bunch of
haskell-language-server binaries, then use
to appropriately choose the right version.
- Each project has its own virtual environment.
- Different projects use different versions of Python.
- Each python project can define its own formatting rules. Some projects may
black, while others use
yapf. Each project might define, say, different maximum line lengths.
- Each project can define its own linting rules (using say
/usr/local/bin/npm -g --prefix /Users/chris.clark/emacs/cfclrk/.cache/lsp/npm/pyright install pyright
Is there a way to conditionally load either the black or yapf lsp plugins depending on project config?
yarn global add bash-language-server
I don't use
pyls anymore, I've switched to
pyls-mypy, etc must be on your
$PATH. There are a few
ways to accomplish this.
pyls(etc) into every virtual environment. Perhaps, add it to the pyenv default packages list.
- Create a pyenv virtual env specifically for
pylsetc. Then in each project, do
pyenv local $PROJECTVENV $PYLSVENV. With
pyenvyou can set multiple active virtual environments, so always activate the environment with
pylsetc. somewhere else on your
$PATH, and do not install it into any pyenv virtual environment.
I used (2) for a while. Now I'm going with (3). To install it in a globally-accessible place:
/usr/local/opt/python3/libexec/bin/pip install pyls /usr/local/opt/python3/libexec/bin/pip install pyls-mypy /usr/local/opt/python3/libexec/bin/pip install pyls-isort /usr/local/opt/python3/libexec/bin/pip install pyls-black
Note that if any of
pyls-mypy, etc are installed in any pyenv virtual environment, things will start going wrong unless you really know what you're doing. That shouldn't be a problem: no python package should be requiring
pylsor LSP plugins (even as development dependencies). Different developers use different things, and not everyone uses LSP, so requiring it would be silly.
NOTE: I ALSO NEEDED TO INSTALL mypy and isort into the top-level pip. HOW CAN I MAKE LSP use the versions of mypy and isort in the virtual environment?
/usr/local/opt/python3/libexec/bin/pip install isort /usr/local/opt/python3/libexec/bin/pip install mypy