aboutsummaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2024-05-25 09:02:44 +0200
committerMiquel Sabaté Solà <mikisabate@gmail.com>2024-05-25 09:02:44 +0200
commit081016d4b07b6a3577bff8acf8b4ee4d031ee580 (patch)
tree72bb2d3d02111bcc234ca8ea7838dc9398b9e731 /.config
parent5279b903898840fa485174b4599d888870cb425c (diff)
downloaddotfiles-081016d4b07b6a3577bff8acf8b4ee4d031ee580.tar.gz
dotfiles-081016d4b07b6a3577bff8acf8b4ee4d031ee580.zip
doom: trying lsp for cc, ruby and rust
This used to be a pain in the past. Let's see how it performs nowadays... Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to '.config')
-rw-r--r--.config/doom/config.el13
-rw-r--r--.config/doom/init.el8
2 files changed, 17 insertions, 4 deletions
diff --git a/.config/doom/config.el b/.config/doom/config.el
index b07089c..429677b 100644
--- a/.config/doom/config.el
+++ b/.config/doom/config.el
@@ -155,6 +155,19 @@
(map! "<f9>" #'langtool-check-buffer)
(map! "M-<f9>" #'langtool-correct-buffer))
+;;; Programming languages.
+
+;; Flags to be passed to `clangd' for LSP integration.
+(after! lsp-clangd
+ (setq lsp-clients-clangd-args
+ '("-j=3"
+ "--background-index"
+ "--clang-tidy"
+ "--completion-style=detailed"
+ "--header-insertion=never"
+ "--header-insertion-decorators=0"))
+ (set-lsp-priority! 'clangd 2))
+
;;; Organization
;; Setting this variable before org-mode loads.
diff --git a/.config/doom/init.el b/.config/doom/init.el
index 38ed78a..e14ee1a 100644
--- a/.config/doom/init.el
+++ b/.config/doom/init.el
@@ -79,7 +79,7 @@
(eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists
lookup ; navigate your code and its documentation
- ;;lsp ; M-x vscode
+ lsp ; M-x vscode
magit ; a git porcelain for Emacs
make ; run make tasks from Emacs
;;pass ; password manager for nerds
@@ -98,7 +98,7 @@
:lang
;;agda ; types of types of types of types...
;;beancount ; mind the GAAP
- cc ; C > C++ == 1
+ (cc +lsp) ; C > C++ == 1
;;clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
@@ -144,8 +144,8 @@
;;raku ; the artist formerly known as perl6
;;rest ; Emacs as a REST client
;;rst ; ReST in peace
- (ruby +rails +rvm) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
- rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
+ (ruby +rails +rvm +lsp) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
+ (rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good
;;(scheme +guile) ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor