pyright
This commit is contained in:
parent
e56c71e8bd
commit
222c013f54
1 changed files with 35 additions and 9 deletions
44
init.el
44
init.el
|
@ -20,8 +20,11 @@
|
|||
(dashboard-setup-startup-hook))
|
||||
|
||||
;; UI
|
||||
(use-package company :ensure t :config (global-company-mode t))
|
||||
(use-package treemacs :ensure t)
|
||||
(use-package company :ensure t :config (global-company-mode))
|
||||
(use-package flycheck
|
||||
:ensure t
|
||||
:config
|
||||
(add-hook 'after-init-hook #'global-flycheck-mode))
|
||||
(use-package all-the-icons
|
||||
:ensure t
|
||||
:if (display-graphic-p))
|
||||
|
@ -36,10 +39,27 @@
|
|||
;; LSP
|
||||
(use-package lsp-mode
|
||||
:ensure t
|
||||
:config (lsp-mode t)(setq lsp-headerline-breadcrumb-enable nil))
|
||||
:config
|
||||
(lsp-mode t)
|
||||
(setq lsp-headerline-breadcrumb-enable nil))
|
||||
|
||||
(use-package lsp-ui
|
||||
:ensure t
|
||||
:after lsp-mode)
|
||||
:after lsp-mode
|
||||
:config
|
||||
(setq lsp-ui-doc-enable nil)
|
||||
(setq lsp-ui-doc-show-with-mouse nil)
|
||||
(setq lsp-ui-doc-show-with-cursor t)
|
||||
(setq lsp-ui-doc-position 'bottom)
|
||||
(setq lsp-ui-doc-alignment 'frame))
|
||||
|
||||
(use-package lsp-pyright
|
||||
:ensure t
|
||||
:custom (lsp-pyright-langserver-command "pyright") ;; or basedpyright
|
||||
:hook (python-ts-mode . (lambda ()
|
||||
(require 'lsp-pyright)
|
||||
(lsp)))) ; or lsp-deferred
|
||||
|
||||
(use-package company-quickhelp
|
||||
:ensure t
|
||||
:after company
|
||||
|
@ -48,13 +68,17 @@
|
|||
(use-package magit :ensure t)
|
||||
|
||||
;; MODES
|
||||
(use-package rust-mode
|
||||
(use-package rustic
|
||||
:ensure t
|
||||
:hook (rust-mode . lsp)
|
||||
:init
|
||||
(setq rust-mode-treesitter-derive t))
|
||||
:config
|
||||
(setq rustic-format-on-save nil)
|
||||
:custom
|
||||
(rustic-cargo-use-last-stored-arguments t))
|
||||
(use-package astro-ts-mode :ensure t)
|
||||
|
||||
(setq major-mode-remap-alist
|
||||
'((python-mode . python-ts-mode)))
|
||||
|
||||
;; OTHER
|
||||
(use-package treemacs-projectile
|
||||
:after (treemacs projectile)
|
||||
|
@ -73,5 +97,7 @@
|
|||
'((astro "https://github.com/virchau13/tree-sitter-astro")
|
||||
(css "https://github.com/tree-sitter/tree-sitter-css")
|
||||
(tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src")
|
||||
(typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src"))))
|
||||
(typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src")
|
||||
(python "https://github.com/tree-sitter/tree-sitter-python")
|
||||
(rust "https://github.com/tree-sitter/tree-sitter-rust"))))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue