知りたいこと
Emacsでtypescriptの開発をするうえでtideとは?ということの概要を学習したい。 そのうえで、tideとEglotによるlang serverを併用するのが良いのかを知りたい。
Geminiによる回答
Reasoning
*Exploring Core Question 1
I’m currently focused on defining tide within the Emacs/TypeScript environment. The goal is to provide a concise overview for the user. I’m actively working to synthesize the relevant information and ensure clarity in my explanation.
Refining the Explanation
I’m now refining the explanation of tide. The focus is on the crucial role of tsserver as its engine. I’m exploring the best way to succinctly highlight tide’s key features, such as completion and error checking, without overwhelming the user. The goal is a truly concise overview.
Assessing the Landscape
I’m now carefully examining the compatibility of tide and Eglot. My focus is on determining their potential interactions and whether a combined setup offers any practical advantages or drawbacks for the user. I’m prioritizing providing a straightforward recommendation, based on the specific context of TypeScript development in Emacs.
Comparing Integration Options
I’m now comparing tide and Eglot to understand their respective merits. My goal is to outline the benefits of each, considering their interaction with tsserver. I’m focusing on the technical compatibility and the user experience implications of using either standalone or combined.
Analyzing the Options
I’m now focusing on a more direct comparison of tide and Eglot to highlight the user’s key considerations. I will emphasize the value proposition of each option for TypeScript development. The goal is a clear, concise recommendation in line with the prompt.
Finalizing Recommendations
I’ve completed my analysis of the options. Based on current trends, Eglot or LSP Mode are the recommended choices, particularly if you’re working with multiple languages in Emacs. I’m satisfied that my summary provides a clear and concise response.
Revising Recommendations
I’m now revising my recommendations, focusing on concise and practical advice. The emphasis is on highlighting the benefits of utilizing a modern language server solution. My aim is to provide a compelling argument for embracing contemporary development practices, catering to the user’s Emacs environment.
はい、承知いたしました。簡潔に回答します。
1. Tideとは?
TideはEmacsでTypeScript開発を支援するマイナーモードです。
- 仕組み: Microsoft公式の=tsserver= (TypeScript Language Service) を直接利用して、コード補完、エラーチェック、定義ジャンプ、リファクタリング等の機能を提供します。
- 特徴: Language Server Protocol (LSP) が普及する前から存在し、長らくEmacsでのTypeScript開発の定番でした。
2. TideとEglotの併用は?
併用はしません。どちらか一方を選びます。
理由は、両者の役割が重複するためです。
- Tide: =tsserver=の専用クライアント。
- Eglot: 様々な言語に対応する汎用的なLSPクライアント。TypeScriptの場合は
typescript-language-server(これも内部で=tsserver=を利用) と通信します。
結論
現在はEglot (またはLSP Mode) を利用するのが一般的です。
他の言語もEmacsで開発する場合、LSPに統一することで同じ操作感を得られるメリットが大きいためです。TypeScriptのみを書く場合でも、モダンなエコシステムに乗る観点からEglotをおすすめします。
個人で調べてみたこと
どうやらtideを使ってeglotを使っている例が少なそう。 あまり、eglotを使っている例が見られない。 一旦、開発するに当たってはtideを利用し、typesscriptの開発環境ではlspは使わないことにする。