wiki/_next/data/Ie9t5zutrXP6Of75Cb5xF/editor.emacs.as-ide.json

1 line
8.6 KiB
JSON
Raw Normal View History

2022-07-29 15:41:17 +00:00
{"pageProps":{"metadata":{"date":"\"2021-05-09 17:28:23 +08:00\"","date_modified":"\"2021-07-20 23:31:45 +08:00\"","language":"en","source":""},"title":"Emacs as an IDE","hast":{"type":"root","children":[{"type":"element","tagName":"nav","properties":{"className":"toc"},"children":[{"type":"element","tagName":"ol","properties":{"className":"toc-level toc-level-1"},"children":[{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"language-server-protocol"},"children":[{"type":"text","value":"Language server protocol"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/editor.emacs.as-ide#language-server-protocol"},"children":[{"type":"text","value":"Language server protocol"}]}]},{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"debug-adapter-protocol"},"children":[{"type":"text","value":"Debug Adapter Protocol"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/editor.emacs.as-ide#debug-adapter-protocol"},"children":[{"type":"text","value":"Debug Adapter Protocol"}]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The development of Visual Studio Code has led to several improvements that benefitted all editors for implementing IDE-like features: "},{"type":"element","tagName":"a","properties":{"href":"https://github.com/Microsoft/debug-adapter-protocol"},"children":[{"type":"text","value":"Debug Adapter Protocol"}]},{"type":"text","value":" (DAP) and "},{"type":"element","tagName":"a","properties":{"href":"https://microsoft.github.io/language-server-protocol/"},"children":[{"type":"text","value":"Language Server Protocol"}]},{"type":"text","value":" (LSP).\n"}]},{"type":"element","tagName":"h1","properties":{"id":"language-server-protocol"},"children":[{"type":"text","value":"Language server protocol"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The community of Emacs was able to "},{"type":"element","tagName":"a","properties":{"href":"https://emacs-lsp.github.io/lsp-mode/"},"children":[{"type":"text","value":"integrate the protocol"}]},{"type":"text","value":" enabling IDE features to be possible (e.g., autocompletion, Intellisense).\nSetting up LSP consists of installing the "},{"type":"element","tagName":"a","properties":{"href":"https://microsoft.github.io/language-server-protocol/implementors/servers/"},"children":[{"type":"text","value":"language server for a specific language"}]},{"type":"text","value":" and hoping for the best if a community member has implemented LSP support for that language and the editor of choice.\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"On Emacs, you simply have to do these things:\n"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Install "},{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"lsp-mode"}]},{"type":"text","value":" (or enable "},{"type":"element","tagName":"a","properties":{"href":"https://github.com/hlissner/doom-emacs/tree/develop/modules/tools/lsp"},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"tools/lsp"}]}]},{"type":"text","value":" built-in module if you're using Doom Emacs).\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Install the language server of the language/tool before enabling "},{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"lsp-mode"}]},{"type":"t