home

My NixOS systems configurations.
Log | Files | Refs | LICENSE

commit 96fdfc9e35db513df4fa8eeb0bb8ea390133a006
parent cb528c9565e7c9c4a26ee3da064114191c2a5ed2
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Mon, 14 Mar 2022 11:27:10 +0100

tools/emacs: add lsp-mode 😅

Add gopls and python-language-server as well.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Atools/emacs/config/programming-lsp.el | 19+++++++++++++++++++
Musers/vincent/dev/emacs.nix | 9+++++++--
Musers/vincent/dev/go.nix | 1+
Musers/vincent/dev/python.nix | 1+
4 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/tools/emacs/config/programming-lsp.el b/tools/emacs/config/programming-lsp.el @@ -0,0 +1,19 @@ +;;; programming-lsp.el --- -*- lexical-binding: t; -*- +;;; Commentary: +;;; LSP configuration +;;; Code: +(use-package lsp-mode + :unless noninteractive + :init + (setq lsp-keymap-prefix "C-c l") + :config + (setq lsp-eldoc-render-all t) + (add-hook 'python-mode-hook #'lsp) + (add-hook 'go-mode-hook #'lsp) + (setq lsp-eldoc-render-all t)) + +(use-package consult-lsp + :after (lsp)) + +(provide 'programming-lsp) +;;; programming-lsp.el ends here diff --git a/users/vincent/dev/emacs.nix b/users/vincent/dev/emacs.nix @@ -52,8 +52,9 @@ let expand-region flimenu # replace with flymake - flycheck - flycheck-golangci-lint + # flycheck + # flycheck-golangci-lint + focus git-annex git-modes git-commit @@ -72,6 +73,10 @@ let ibuffer-vc icomplete-vertical json-mode + lsp-mode + lsp-ui + lsp-focus + consult-lsp magit magit-annex magit-popup diff --git a/users/vincent/dev/go.nix b/users/vincent/dev/go.nix @@ -7,6 +7,7 @@ home.packages = with pkgs; [ gcc go_1_17 + gopls godef golangci-lint golint diff --git a/users/vincent/dev/python.nix b/users/vincent/dev/python.nix @@ -4,5 +4,6 @@ home.packages = with pkgs; [ python3 pipenv + python-language-server ]; }