run lsp-mode on non-nativecomp emacs, add support for rmd

This commit is contained in:
Grigory Shipunov 2021-10-27 02:53:03 +02:00
parent c626ee3f8d
commit 5e78f5ad55

50
init.el
View file

@ -55,7 +55,7 @@
(setq-default fill-column 80) (setq-default fill-column 80)
;; I'm the only cowboy on this mainframe ;; I'm the only cowboy on this mainframe
(setq create-lockfiles nil) ;; (setq create-lockfiles nil)
;; X is dead ;; X is dead
(setq inhibit-x-resources t) (setq inhibit-x-resources t)
@ -199,6 +199,7 @@
(cc-mode . rainbow-delimiters-mode))) (cc-mode . rainbow-delimiters-mode)))
(use-package org (use-package org
:straight t
:bind (("C-c a" . org-agenda) :bind (("C-c a" . org-agenda)
("C-c c" . org-capture) ("C-c c" . org-capture)
("C-c l" . org-store-link) ("C-c l" . org-store-link)
@ -273,11 +274,11 @@
:config :config
(org-roam-db-autosync-mode 1)) (org-roam-db-autosync-mode 1))
(use-package org-download ;; (use-package org-download
:straight t ;; :straight t
:init (setq org-download-method 'directory ;; :init (setq org-download-method 'directory
org-download-image-dir "./static/org-download" ;; org-download-image-dir "./static/org-download"
org-download-heading-lvl 0)) ;; org-download-heading-lvl 0))
(use-package magit (use-package magit
:straight t :straight t
@ -315,7 +316,15 @@
(straight-use-package 'nix-mode) (straight-use-package 'nix-mode)
(straight-use-package 'markdown-mode) (straight-use-package 'markdown-mode)
(straight-use-package 'editorconfig) (straight-use-package 'editorconfig)
(straight-use-package 'ess)
;; R stuff
(use-package ess
:straight t
:init
(setq ess-use-flymake nil))
(use-package poly-R
:straight t)
;; scheming ;; scheming
(straight-use-package 'racket-mode) (straight-use-package 'racket-mode)
@ -330,21 +339,18 @@
(setq python-shell-interpreter "python") (setq python-shell-interpreter "python")
(setq flycheck-python-pycompile-executable "python") (setq flycheck-python-pycompile-executable "python")
;; use lsp if we have nativecomp - without it it's too slow :( (use-package lsp-mode
(if oxa/using-native-comp :straight t
(progn :init
(use-package lsp-mode (setq lsp-keymap-prefix "C-z l")
:straight t :hook ((c-mode . lsp)
:init (nix-mode . lsp)
(setq lsp-keymap-prefix "C-z l") (python-mode . lsp)
:hook ((c-mode . lsp) (LaTeX-mode . lsp)
(nix-mode . lsp) (TeX-mode . lsp)
(python-mode . lsp) (lsp-mode . lsp-enable-which-key-integration))
(LaTeX-mode . lsp) :commands lsp)
(TeX-mode . lsp) (use-package lsp-ui :straight t :commands lsp-ui-mode)
(lsp-mode . lsp-enable-which-key-integration))
:commands lsp)
(use-package lsp-ui :straight t :commands lsp-ui-mode)))
;; I use custom vars for local config, so let's put them to separate file, where ;; I use custom vars for local config, so let's put them to separate file, where
;; it's easier for git to ignore it ;; it's easier for git to ignore it