Skip to content

Commit

Permalink
; Python/Typst/copilot-chat小修正
Browse files Browse the repository at this point in the history
  • Loading branch information
nasyxx committed Nov 1, 2024
1 parent 804cba4 commit 78a0a75
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions 蔓艸/緑衣/補.org
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
(sup '(copilot-chat :host github :repo "chep/copilot-chat.el"
:files ("*.el"))
t)
(require 'copilot-chat-shell-maker)
(sup 'corfu t)
(sup `(corfu-extensions
:local-repo ,(concat (straight--repos-dir "corfu") "extensions")))
Expand Down
17 changes: 12 additions & 5 deletions 蔓艸/麐之趾/篇.org
Original file line number Diff line number Diff line change
Expand Up @@ -1778,6 +1778,11 @@ https://github.com/wbolster/emacs-python-black
*** lsp-pyright :python:

#+begin_src emacs-lisp
(defun pdm-py-path ()
"Get the python path from pdm."
(when (zerop (shell-command "pdm info"))
(string-trim (shell-command-to-string "pdm info --python"))))

(defun python-setup-lsp-flycheck ()
"Setup python lsp flycheck."
(if lsp-diagnostics-mode
Expand Down Expand Up @@ -1808,7 +1813,7 @@ https://github.com/wbolster/emacs-python-black
(lsp))

(setup lsp-pyright
(:quit)
(:opt lsp-pyright-langserver-command "basedpyright")
(:hooks
python-mode-hook start-lsp-pyright
python-ts-mode-hook start-lsp-pyright
Expand Down Expand Up @@ -1846,10 +1851,10 @@ https://github.com/wbolster/emacs-python-black
*** basedpyright :python:

#+begin_src emacs-lisp
(defun pdm-py-path ()
"Get the python path from pdm."
(when (zerop (shell-command "pdm info"))
(string-trim (shell-command-to-string "pdm info --python"))))
;; (defun pdm-py-path ()
;; "Get the python path from pdm."
;; (when (zerop (shell-command "pdm info"))
;; (string-trim (shell-command-to-string "pdm info --python"))))

(defun start-lsp-basedpyright ()
"Start lsp pyright with pdm."
Expand All @@ -1874,6 +1879,7 @@ https://github.com/wbolster/emacs-python-black


(setup lsp-basedpyright
(:quit)
(:hooks
python-mode-hook start-lsp-basedpyright
python-ts-mode-hook start-lsp-basedpyright)
Expand Down Expand Up @@ -2010,6 +2016,7 @@ Tree Sitter support for Typst. https://git.sr.ht/~meow_king/typst-ts-mode
(:doc "Tree Sitter support for Typst.")
(:url "https://git.sr.ht/~meow_king/typst-ts-mode")
(:tag "languages" "grammar" "typst")
(defvar typst-ts-mode-fontification-precision-level 'max)
(setq typst-ts-mode-fontification-precision-level 'max
typst-ts-markup-header-same-height nil)
(:opt
Expand Down

0 comments on commit 78a0a75

Please sign in to comment.