Change lsp-go config and embark act hotkey

main
Sergio Alvariño 3 years ago
parent 5c745d6e94
commit fd9628ff84

@ -9,7 +9,7 @@
- Check =pdf-tools= - Check =pdf-tools=
- Check =org-presentation= - Check =org-presentation=
- Check ESS and project.el problem - Check ESS and project.el problem
* Famous init files * Famous init files
- [[https://github.com/zamansky/dot-emacs][The Big Zemansky]] - [[https://github.com/zamansky/dot-emacs][The Big Zemansky]]
- [[https://pages.sachachua.com/.emacs.d/Sacha.html][Sacha Chua Emac's configuration]] - [[https://pages.sachachua.com/.emacs.d/Sacha.html][Sacha Chua Emac's configuration]]
@ -103,7 +103,7 @@ Some notes about [[https://github.com/jwiegley/use-package][use-package]]
;; Set encoding ;; Set encoding
(prefer-coding-system 'utf-8) (prefer-coding-system 'utf-8)
#+end_src #+end_src
** Some shortcuts ** Some shortcuts
Useful shortcuts: Useful shortcuts:
- Revert buffer (recargar) - Revert buffer (recargar)
@ -376,7 +376,7 @@ Some notes about [[https://github.com/jwiegley/use-package][use-package]]
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package embark (use-package embark
:bind :bind
(("C-." . embark-act) ;; pick some comfortable binding (("C-+" . embark-act) ;; pick some comfortable binding
("C-;" . embark-dwim) ;; good alternative: M-. ("C-;" . embark-dwim) ;; good alternative: M-.
("C-h B" . embark-bindings)) ;; alternative for `describe-bindings' ("C-h B" . embark-bindings)) ;; alternative for `describe-bindings'
@ -683,7 +683,7 @@ This function:
This is only a defun for settings additional details in =org-mode= This is only a defun for settings additional details in =org-mode=
- Make rendered LaTeX bigger (use =C-c C-x C-l= to swich the view mode) - Make rendered LaTeX bigger (use =C-c C-x C-l= to swich the view mode)
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun slv/org-tweaks-setup () (defun slv/org-tweaks-setup ()
(plist-put org-format-latex-options :scale 2) ;; Increase size of LaTeX fragment previews (plist-put org-format-latex-options :scale 2) ;; Increase size of LaTeX fragment previews
@ -706,7 +706,7 @@ Configuring:
- Sets =visual-line-mode= on, when using this mode you should avoid using =M-q= (=org-fill-paragraph=). Just use =enter= to finish a paragraph. - Sets =visual-line-mode= on, when using this mode you should avoid using =M-q= (=org-fill-paragraph=). Just use =enter= to finish a paragraph.
- Call =slv/org-font-setup= function, this function, defined in the section above, sets the fonts for =org-mode=. - Call =slv/org-font-setup= function, this function, defined in the section above, sets the fonts for =org-mode=.
- =:custom= section: - =:custom= section:
- Sets a new =org-elipsis= symbol. This is the symbol to be used instead of =...= for folded sections - Sets a new =org-elipsis= symbol. This is the symbol to be used instead of =...= for folded sections
- Sets the org files directory (Dropbox for me) - Sets the org files directory (Dropbox for me)
- Sets a sound for =org-clock-sound= - Sets a sound for =org-clock-sound=
- Sets the default notes file: =i.org= - Sets the default notes file: =i.org=
@ -1078,7 +1078,7 @@ command and sqlite3 must be available
* flycheck * flycheck
Syntax checking for programming languages Syntax checking for programming languages
You *must* use [[https://www.flycheck.org/en/latest/][flycheck]] if you use LSP. (Flymake + LSP is hell) You *must* use [[https://www.flycheck.org/en/latest/][flycheck]] if you use LSP. (Flymake + LSP is hell)
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package flycheck (use-package flycheck
@ -1089,7 +1089,7 @@ You *must* use [[https://www.flycheck.org/en/latest/][flycheck]] if you use LSP.
(global-flycheck-mode t) (global-flycheck-mode t)
) )
#+end_src #+end_src
* LSP * LSP
We are using [[https://emacs-lsp.github.io/lsp-mode/][lsp-mode]] but keep an eye on [[https://github.com/joaotavora/eglot][eglot]] as an alternative. We are using [[https://emacs-lsp.github.io/lsp-mode/][lsp-mode]] but keep an eye on [[https://github.com/joaotavora/eglot][eglot]] as an alternative.
@ -1230,7 +1230,7 @@ use for your debug templates!
;; ;; Set up Node debugging ;; ;; Set up Node debugging
;; (require 'dap-node) ;; (require 'dap-node)
;; (dap-node-setup) ;; Automatically installs Node debug adapter if needed ;; (dap-node-setup) ;; Automatically installs Node debug adapter if needed
;; ;;
;; ;; Bind `C-c l d` to `dap-hydra` for easy access ;; ;; Bind `C-c l d` to `dap-hydra` for easy access
;; ;;(general-define-key ;; ;;(general-define-key
;; ;; :keymaps 'lsp-mode-map ;; ;; :keymaps 'lsp-mode-map
@ -1248,19 +1248,20 @@ References:
- [[https://gist.github.com/psanford/b5d2689ff1565ec7e46867245e3d2c76][psandford/gopls configuration]] - [[https://gist.github.com/psanford/b5d2689ff1565ec7e46867245e3d2c76][psandford/gopls configuration]]
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package go-mode (use-package go-mode
:custom :after lsp
;; (lsp-enable-links nil) :custom
;; (lsp-clients-go-server-args '("--cache-style=always" "--diagnostics-style=onsave" "--format-style=goimports")) ;; (lsp-enable-links nil)
(lsp-gopls-server-args '("--debug=localhost:6060")) ;; (lsp-clients-go-server-args '("--cache-style=always" "--diagnostics-style=onsave" "--format-style=goimports"))
(lsp-gopls-staticcheck t) (lsp-gopls-server-args '("--debug=localhost:6060"))
;; (lsp-gopls-complete-unimported t) (lsp-gopls-staticcheck t)
:hook ;; (lsp-gopls-complete-unimported t)
((go-mode . lsp-deferred) :hook
(before-save . lsp-format-buffer) ((go-mode . lsp-deferred)
(before-save . lsp-organize-imports) (before-save . lsp-format-buffer)
(before-save . gofmt-before-save) (before-save . lsp-organize-imports)
) (before-save . gofmt-before-save)
) )
)
#+end_src #+end_src
*** go-snippets *** go-snippets
@ -1301,7 +1302,7 @@ References:
(rust-format-on-save t) (rust-format-on-save t)
(lsp-rust-server 'rust-analyzer)) (lsp-rust-server 'rust-analyzer))
#+end_src #+end_src
** Python ** Python
We do need a Python language server installed in the developing enviroment (=pip install python-lsp-server[all]=) We do need a Python language server installed in the developing enviroment (=pip install python-lsp-server[all]=)
- https://www.mattduck.com/lsp-python-getting-started.html - https://www.mattduck.com/lsp-python-getting-started.html
@ -1323,7 +1324,7 @@ Not needed if you have the right settings on your active python with =pyenv=
:hook (python-mode . lsp-deferred) :hook (python-mode . lsp-deferred)
;; :custom ;; :custom
;; (dap-python-debugger 'debugpy) ;; (dap-python-debugger 'debugpy)
;; ;;
;;;;; NOTE: Set these if Python 3 is called "python3" on your system! ;;;;; NOTE: Set these if Python 3 is called "python3" on your system!
;;;; (python-shell-interpreter "python3") ;;;; (python-shell-interpreter "python3")
;;;; (dap-python-executable "python3") ;;;; (dap-python-executable "python3")

Loading…
Cancel
Save