You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but none of those worked. I still go too much indentation.
js-ts-mode seems to respect indentation correctly. Is there some kind of hook or variable that might not be right to support typescript-ts-mode? I noticed
Is there some kind of hook I'd need to use? The current stock alist tries setting typescript-ts-base-mode, but it seems to not be working.
🙏 Thank you for providing this package to the community. It's really helping me avoid VS Code :D
Relevant Config
;;;;;;;;;;;;;;; Copilot ;;;;;;;;;;;;;;;
(use-package copilot
:straight (:host github :repo"copilot-emacs/copilot.el":files ("*.el"))
:hook
(typescript-ts-mode . copilot-mode)
:bind
(:map copilot-completion-map
("M-<return>".'copilot-accept-completion)
("M-]".'copilot-next-completion)
("M-[".'copilot-previous-completion))
:config
(add-to-list 'copilot-indentation-alist '(typescript-ts-mode typescript-ts-mode-indent-offset)))
;;;;;;;;;;;;;;;;;;; tree-sitter ;;;;;;;;;;;;;;;;;;;
(use-package tree-sitter
:custom;; Take syntax highlighting to the "angry fruit salad" level;; Cmd-F here: https://www.masteringemacs.org/article/how-to-get-started-tree-sitter
(treesit-font-lock-level 4)
:config
(global-tree-sitter-mode)
(add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode))
;;;;;;;;;;;;;;;;;;;;;; Language modes ;;;;;;;;;;;;;;;;;;;;;;
(use-package typescript-ts-mode
:ensurenil; built-in:mode;; Use the tree-sitter special modes
("\\.ts\\'". typescript-ts-mode)
("\\.tsx\\'". tsx-ts-mode)
:hook
(typescript-ts-mode . add-node-modules-path)
(typescript-ts-mode . prettier-js-mode)
(tsx-ts-mode . add-node-modules-path)
(tsx-ts-mode . prettier-js-mode))
The text was updated successfully, but these errors were encountered:
I use
typescript-ts-mode
for TypeScript (the tree-sitter version, built in to Emacs) and I can't getcopilot-indentation-alist
working correctly.Here's what I see:
On the left, you can see indentation is not 2 spaces, even though on the right
typescript-ts-mode-indent-offset
is2
.I noticed copilot-indentation-alist has these entries by default:
So I tried a few things in my config:
but none of those worked. I still go too much indentation.
js-ts-mode seems to respect indentation correctly. Is there some kind of hook or variable that might not be right to support typescript-ts-mode? I noticed
Is there some kind of hook I'd need to use? The current stock alist tries setting
typescript-ts-base-mode
, but it seems to not be working.🙏 Thank you for providing this package to the community. It's really helping me avoid VS Code :D
Relevant Config
The text was updated successfully, but these errors were encountered: