diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 31 |
1 files changed, 29 insertions, 2 deletions
@@ -43,12 +43,39 @@ Fixed in a follow-up commit: and hooks `lsp` into `verilog-mode`, but the binary is not installed, so opening Verilog files errored. Now registered only when the binary exists (`executable-find`). Install `verible` to re-enable. +3. **Harmless native-comp warnings** — packages like go-mode reference + lsp-mode/eglot functions they don't require; the resulting + `(native-compiler)` warnings cluttered *Warnings*. Now suppressed + (`warning-suppress-types`, after the custom block). + +## Python: per-project micromamba environments + +Python LSP is deliberately NOT enabled globally (see the comment on the +eglot `use-package` form): mode hooks run before `.dir-locals.el` applies, +so a global hook would always connect to the system pylsp. Instead each +micromamba project carries a `.dir-locals.el` that points the interpreter, +`exec-path` and eglot at the env, then starts eglot. + +New project setup: + +```sh +micromamba create -n ENVNAME -c conda-forge python=3.12 python-lsp-server <libs> +cp templates/python-project-dir-locals.el <project>/.dir-locals.el # edit env path +``` + +First time you open a file in the project, Emacs asks to trust the `eval` +forms — answer `!` (trust always). + +`~/Projects/vkeHF` is set up this way with env `vkehf` +(numpy, control, matplotlib, python-lsp-server); verified that eglot spawns +`~/.local/share/mamba/envs/vkehf/bin/pylsp`. Known quirks left as-is (deliberate-looking choices — revisit if annoying): - **`lsp-mode` and `eglot` are both active**: lsp-mode owns C/C++/Verilog/VHDL/ - LaTeX, eglot owns Java/Scala/Python/Clojure. The C/C++ overlap is noted in - the config itself. Works, but pick one eventually. + LaTeX, eglot owns Java/Scala/Clojure (Python is per-project, see above). + The C/C++ overlap is noted in the config itself. Works, but pick one + eventually. - **`jdtls` is not installed**, so Java files will fail to start eglot. Install `jdtls` (or drop java-mode from the eglot hook). - **`flycheck-c/c++-gcc-executable` is set to `/usr/bin/avr-gcc`** in |
