diff --git a/feed_rss_created.xml b/feed_rss_created.xml
index 14fea429f3d..2094a040e32 100644
--- a/feed_rss_created.xml
+++ b/feed_rss_created.xml
@@ -1 +1 @@
-
lsp-zig-warn-style
Default: nil
Enables warnings for style guideline mismatches.
lsp-zig-zig-exe-path
#Type: string
Default: ``
+Zig executable path.
+
e.g. /path/to/zig/zig, used to run the custom build runner. If null, zig is +looked up in PATH. Will be used to infer the zig standard library path if none +is provided.
+lsp-zig-zig-lib-path
#Type: string
Default: ``
diff --git a/search/search_index.json b/search/search_index.json index 6b42648d498..55ef86e68b4 100644 --- a/search/search_index.json +++ b/search/search_index.json @@ -1 +1 @@ -{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Language Server Protocol Support for Emacs # homepage \u2022 installation \u2022 languages \u2022 settings \u2022 tutorials \u2022 troubleshooting \u2022 screenshots \u2022 FAQ Why? # Community Driven Fully featured - supports all features in Language Server Protocol v3.14. Fast - see performance section . Flexible - choose between full-blown IDE with flashy UI or minimal distraction free. Easy to configure - works out of the box and automatically upgrades if additional packages are present. Overview # Client for Language Server Protocol (v3.14). lsp-mode aims to provide IDE-like experience by providing optional integration with the most popular Emacs packages like company , flycheck and projectile . Non-blocking asynchronous calls Real-time Diagnostics/linting via flycheck (recommended) or flymake when Emacs > 26 (requires flymake>=1.0.5) Code completion - company-capf / completion-at-point (note that company-lsp is no longer supported). Hovers - using lsp-ui Code actions - via lsp-execute-code-action , modeline (recommended) or lsp-ui sideline. Code outline - using builtin imenu or helm-imenu Code navigation - using builtin xref , lsp-treemacs tree views or lsp-ui peek functions. Code lens Symbol highlights Formatting Project errors on modeline Debugger - dap-mode Breadcrumb on headerline Helm integration - helm-lsp Ivy integration - lsp-ivy Consult integration - consult-lsp Treemacs integration - lsp-treemacs Semantic tokens as defined by LSP 3.16 (compatible language servers include recent development builds of clangd and rust-analyzer) which-key integration for better discovery iedit dired ido Presentations/demos # System Crafters channel Emacs IDE Videos skybert 's emacsconf presentation (Java) thatwist 's ScalaUA Conference presentation (Scala) See also # lsp-docker - provide docker image with preconfigured language servers with corresponding emacs configuration. company-box - company frontend with icons. dap-mode - Debugger integration for lsp-mode . eglot - An alternative minimal LSP implementation. which-key - Emacs package that displays available keybindings in popup projectile - Project Interaction Library for Emacs emacs-tree-sitter - Faster, fine-grained code highlighting via tree-sitter . gccemacs - modified Emacs capable of compiling and running Emacs Lisp as native code. Contributions # Contributions are very much welcome! NOTE Documentation for clients is generated from doc comments in the clients themselves (see lsp-doc.el ) and some metadata (see lsp-clients.json ) so please submit corrections accordingly. Support the project # The emacs-lsp organization has more than 20,000 lines of code , to keep all of this working, we need to implement new features and help the community on a lot of issues. You can help us keep going and improving it by supporting the project Members # Here it is a list of the current lsp-mode members and what they are primary working on/responsible for. totbwf F# brotzeit Rust dsyzling Scala kurnevsky Scala | Rust seagle0128 Go | Python MS sebastiansturm lsp-mode core | C++ vibhavp lsp-mode core yyoncho lsp-mode core | Java ericdallo Dart/Flutter | Clojure danielmartin C++ | Swift kiennq completions | pwsh nbfalcon lsp-mode core | iedit psibi Terraform | Nix razzmatazz C# | F#","title":"Overview"},{"location":"#language-server-protocol-support-for-emacs","text":"homepage \u2022 installation \u2022 languages \u2022 settings \u2022 tutorials \u2022 troubleshooting \u2022 screenshots \u2022 FAQ","title":"Language Server Protocol Support for Emacs"},{"location":"#why","text":"Community Driven Fully featured - supports all features in Language Server Protocol v3.14. Fast - see performance section . Flexible - choose between full-blown IDE with flashy UI or minimal distraction free. Easy to configure - works out of the box and automatically upgrades if additional packages are present.","title":"Why?"},{"location":"#overview","text":"Client for Language Server Protocol (v3.14). lsp-mode aims to provide IDE-like experience by providing optional integration with the most popular Emacs packages like company , flycheck and projectile . Non-blocking asynchronous calls Real-time Diagnostics/linting via flycheck (recommended) or flymake when Emacs > 26 (requires flymake>=1.0.5) Code completion - company-capf / completion-at-point (note that company-lsp is no longer supported). Hovers - using lsp-ui Code actions - via lsp-execute-code-action , modeline (recommended) or lsp-ui sideline. Code outline - using builtin imenu or helm-imenu Code navigation - using builtin xref , lsp-treemacs tree views or lsp-ui peek functions. Code lens Symbol highlights Formatting Project errors on modeline Debugger - dap-mode Breadcrumb on headerline Helm integration - helm-lsp Ivy integration - lsp-ivy Consult integration - consult-lsp Treemacs integration - lsp-treemacs Semantic tokens as defined by LSP 3.16 (compatible language servers include recent development builds of clangd and rust-analyzer) which-key integration for better discovery iedit dired ido","title":"Overview"},{"location":"#presentationsdemos","text":"System Crafters channel Emacs IDE Videos skybert 's emacsconf presentation (Java) thatwist 's ScalaUA Conference presentation (Scala)","title":"Presentations/demos"},{"location":"#see-also","text":"lsp-docker - provide docker image with preconfigured language servers with corresponding emacs configuration. company-box - company frontend with icons. dap-mode - Debugger integration for lsp-mode . eglot - An alternative minimal LSP implementation. which-key - Emacs package that displays available keybindings in popup projectile - Project Interaction Library for Emacs emacs-tree-sitter - Faster, fine-grained code highlighting via tree-sitter . gccemacs - modified Emacs capable of compiling and running Emacs Lisp as native code.","title":"See also"},{"location":"#contributions","text":"Contributions are very much welcome! NOTE Documentation for clients is generated from doc comments in the clients themselves (see lsp-doc.el ) and some metadata (see lsp-clients.json ) so please submit corrections accordingly.","title":"Contributions"},{"location":"#support-the-project","text":"The emacs-lsp organization has more than 20,000 lines of code , to keep all of this working, we need to implement new features and help the community on a lot of issues. You can help us keep going and improving it by supporting the project","title":"Support the project"},{"location":"#members","text":"Here it is a list of the current lsp-mode members and what they are primary working on/responsible for. totbwf F# brotzeit Rust dsyzling Scala kurnevsky Scala | Rust seagle0128 Go | Python MS sebastiansturm lsp-mode core | C++ vibhavp lsp-mode core yyoncho lsp-mode core | Java ericdallo Dart/Flutter | Clojure danielmartin C++ | Swift kiennq completions | pwsh nbfalcon lsp-mode core | iedit psibi Terraform | Nix razzmatazz C# | F#","title":"Members"},{"location":"blog/2020/7.0-release/","text":"7.0 Release # I am pleased to announce lsp-mode 7.0! Here are the most important features/news in 7.0 release lsp-mode/the team/the ecosystem # lsp-mode team and the activity in the repo has vastly increased. lsp-mode is no longer one man project but it is a product of Emacs LSP team and emacs community. This has allowed us to implement some very time consuming changes/refactoring(more about them bellow) which an year ago were unthinkable due to the lack manpower. emacs-lsp repo has become a nice place to start contributing to open source or learn elisp and now there are 244 contributors in the main repo. Even more some of the current maintainers had zero elisp knowledge before doing their first lsp-mode contributions. We started moving out some of the server specific packages(e. g. lsp-dart maintained by ericdallo and lsp-metals maintained by kurnevsky , lsp-python-ms by seagle0128 , etc) in order to provide focused support by a an expert in the language at hand. Considering where we were few months ago the level of integrated experience provided by those packages has increased and often it is comparable with backed by paid full time developers editors like VScode . Here it is a gif illustrating that: lsp-dart . LSP in its nature should be language agnostic but in order to be comparable with VScode lsp-mode should support language server extensions as well which is much more work than the work on protocol itself and requires a constant monitoring of the server repo since there is no contract and the server team might change the contract whenever they want. On the bright side lsp-mode has attracted several server side developers or lsp-mode team members(e. g. mpanarin ) has become server side contributors and often we are ahead of changes or we directly address issues in the server when they arise. We are still looking for maintainer(s) for JS/TS suite( typescript-language-server , eslint , angular ) though. Major features # 3.16 spec support # We provided full support for 3.14 features one year after the version has been released. Now, we have support for all major features of 3.16 protocol even before it has been released (except for result streaming which apparently hasn't been implemented by any language server). New website # It is created ericdallo - here it is the website . Check it out and eventually provide feedback. Semantic highlights # This is part of 3.16 spec. It is implemented by sebastiansturm and it can be enabled by setting lsp-enable-semantic-highlighting . We have dropped the Theia protocol support for semantic highlighting since it is not going to make to the official spec. ATM it is supported by Rust Analyzer , Clangd (from master branch) and lua language server. org-mode integration(preview) # org-mode mode is the Emacs flagman and this integration brings up the literate programming to a new level. The integration is pretty raw but usable - you basically can run lsp-mode language intelligence over org-mode source block directly in the org-mode document. We have achieved that by creating virtual buffer abstraction which allows us to fake the server that the client has actually opened the real file. Check gif and the docs . I think that the ability to implement such features is why Emacs is editor in a league of its own . And implementing such features is one of the signs that we are slowly moving from the phase catching up into getting ahead (or maybe I am overly optimistic). Language Server Protocol bindings, upcoming changes # We generated json schema from the protocol and from that schema we generated dash destructoring, getters, setters, validators, constructors, indication for optional/required fields, etc. which allow us to perform compile time validation of the protocol usage. This was huge change because we had to walk through almost all methods and replace explicit access to the elisp data structure with protocol usage. At the same time, emacs-lsp organization has more than 20k lines of code. This was coordinated effort and a lot of individuals contributed to that. The benefits are that we now can switch the underlying data structure from hashmap to plists which will yield better performance and also that the overall quality of the codebase has increased. Example Before: ( defun lsp--position-to-point ( params ) \"Convert Position object in PARAMS to a point.\" ( lsp--line-character-to-point ( gethash \"line\" params ) ( gethash \"character\" params ))) After: ( lsp-defun lsp--position-to-point (( &Position :line :character )) \"Convert `Position' object in PARAMS to a point.\" ( lsp--line-character-to-point line character )) In this example :line and :character are validated as fields of Position structure. Also, we do some handy conversions, if the field is optional it will end up with ? like :foo? . To reduce boiler plate code we convert camelCase to :camel-case when we are destructoring it. Performance optimizations(flycheck, code completion) # We have rewritten the flycheck integration - the new integration provides the same UE as the old one but it is much more effective in reporting the errors to flycheck and lsp checker is much closer to the traditional flycheck checkers which are initiated/controlled from Emacs . Completion integration code is now much simpler/faster thanks to kiennq . What's next # Upcoming breaking changes Dropping Emacs 25 support. This will allow us utilize Emacs multi-threading to improve lsp-mode responsibility Switching from hashtables to plists - once this change goes in users must recompile all lsp-mode extensions. Drop company-lsp support(not ported to use lsp-protocol.el ) Implementing lsp-mode configuration wizard to improve beginners experience - check this issue for more details. The overall goal is let user pick settings for all features that are opinionated (e. g. lsp-ui ) and improve the discoverability of lsp-mode features/extensions/settings. We will try to switch to monthly/weakly release cycles and to different person for writing the announcements. We might eventually encourage melpa-stable usage.","title":"7.0 Release"},{"location":"blog/2020/7.0-release/#70-release","text":"I am pleased to announce lsp-mode 7.0! Here are the most important features/news in 7.0 release","title":"7.0 Release"},{"location":"blog/2020/7.0-release/#lsp-modethe-teamthe-ecosystem","text":"lsp-mode team and the activity in the repo has vastly increased. lsp-mode is no longer one man project but it is a product of Emacs LSP team and emacs community. This has allowed us to implement some very time consuming changes/refactoring(more about them bellow) which an year ago were unthinkable due to the lack manpower. emacs-lsp repo has become a nice place to start contributing to open source or learn elisp and now there are 244 contributors in the main repo. Even more some of the current maintainers had zero elisp knowledge before doing their first lsp-mode contributions. We started moving out some of the server specific packages(e. g. lsp-dart maintained by ericdallo and lsp-metals maintained by kurnevsky , lsp-python-ms by seagle0128 , etc) in order to provide focused support by a an expert in the language at hand. Considering where we were few months ago the level of integrated experience provided by those packages has increased and often it is comparable with backed by paid full time developers editors like VScode . Here it is a gif illustrating that: lsp-dart . LSP in its nature should be language agnostic but in order to be comparable with VScode lsp-mode should support language server extensions as well which is much more work than the work on protocol itself and requires a constant monitoring of the server repo since there is no contract and the server team might change the contract whenever they want. On the bright side lsp-mode has attracted several server side developers or lsp-mode team members(e. g. mpanarin ) has become server side contributors and often we are ahead of changes or we directly address issues in the server when they arise. We are still looking for maintainer(s) for JS/TS suite( typescript-language-server , eslint , angular ) though.","title":"lsp-mode/the team/the ecosystem"},{"location":"blog/2020/7.0-release/#major-features","text":"","title":"Major features"},{"location":"blog/2020/7.0-release/#316-spec-support","text":"We provided full support for 3.14 features one year after the version has been released. Now, we have support for all major features of 3.16 protocol even before it has been released (except for result streaming which apparently hasn't been implemented by any language server).","title":"3.16 spec support"},{"location":"blog/2020/7.0-release/#new-website","text":"It is created ericdallo - here it is the website . Check it out and eventually provide feedback.","title":"New website"},{"location":"blog/2020/7.0-release/#semantic-highlights","text":"This is part of 3.16 spec. It is implemented by sebastiansturm and it can be enabled by setting lsp-enable-semantic-highlighting . We have dropped the Theia protocol support for semantic highlighting since it is not going to make to the official spec. ATM it is supported by Rust Analyzer , Clangd (from master branch) and lua language server.","title":"Semantic highlights"},{"location":"blog/2020/7.0-release/#org-mode-integrationpreview","text":"org-mode mode is the Emacs flagman and this integration brings up the literate programming to a new level. The integration is pretty raw but usable - you basically can run lsp-mode language intelligence over org-mode source block directly in the org-mode document. We have achieved that by creating virtual buffer abstraction which allows us to fake the server that the client has actually opened the real file. Check gif and the docs . I think that the ability to implement such features is why Emacs is editor in a league of its own . And implementing such features is one of the signs that we are slowly moving from the phase catching up into getting ahead (or maybe I am overly optimistic).","title":"org-mode integration(preview)"},{"location":"blog/2020/7.0-release/#language-server-protocol-bindings-upcoming-changes","text":"We generated json schema from the protocol and from that schema we generated dash destructoring, getters, setters, validators, constructors, indication for optional/required fields, etc. which allow us to perform compile time validation of the protocol usage. This was huge change because we had to walk through almost all methods and replace explicit access to the elisp data structure with protocol usage. At the same time, emacs-lsp organization has more than 20k lines of code. This was coordinated effort and a lot of individuals contributed to that. The benefits are that we now can switch the underlying data structure from hashmap to plists which will yield better performance and also that the overall quality of the codebase has increased. Example Before: ( defun lsp--position-to-point ( params ) \"Convert Position object in PARAMS to a point.\" ( lsp--line-character-to-point ( gethash \"line\" params ) ( gethash \"character\" params ))) After: ( lsp-defun lsp--position-to-point (( &Position :line :character )) \"Convert `Position' object in PARAMS to a point.\" ( lsp--line-character-to-point line character )) In this example :line and :character are validated as fields of Position structure. Also, we do some handy conversions, if the field is optional it will end up with ? like :foo? . To reduce boiler plate code we convert camelCase to :camel-case when we are destructoring it.","title":"Language Server Protocol bindings, upcoming changes"},{"location":"blog/2020/7.0-release/#performance-optimizationsflycheck-code-completion","text":"We have rewritten the flycheck integration - the new integration provides the same UE as the old one but it is much more effective in reporting the errors to flycheck and lsp checker is much closer to the traditional flycheck checkers which are initiated/controlled from Emacs . Completion integration code is now much simpler/faster thanks to kiennq .","title":"Performance optimizations(flycheck, code completion)"},{"location":"blog/2020/7.0-release/#whats-next","text":"Upcoming breaking changes Dropping Emacs 25 support. This will allow us utilize Emacs multi-threading to improve lsp-mode responsibility Switching from hashtables to plists - once this change goes in users must recompile all lsp-mode extensions. Drop company-lsp support(not ported to use lsp-protocol.el ) Implementing lsp-mode configuration wizard to improve beginners experience - check this issue for more details. The overall goal is let user pick settings for all features that are opinionated (e. g. lsp-ui ) and improve the discoverability of lsp-mode features/extensions/settings. We will try to switch to monthly/weakly release cycles and to different person for writing the announcements. We might eventually encourage melpa-stable usage.","title":"What's next"},{"location":"manual-language-docs/lsp-gopls/","text":"Go (gopls) # lsp-mode provides Go language support via the gopls language server. See upstream for gopls installation instructions. Configuration # By default, some gopls analyzers are enabled and others are disabled. To override, use: (setq lsp-go-analyses '((shadow . t) (simplifycompositelit . :json-false))) Troubleshooting # Working with nested go.mod files # If you encounter an error like one of these: errors loading workspace: You are working in a nested module. Please open it as a separate workspace folder This file is in %s, which is a nested module in the %s module. gopls currently requires one module per workspace folder. Please open %s as a separate workspace folder Then the problem is most likely because lsp-mode has not started gopls with the correct root directory. By default lsp-mode will pick the root of your whole Git repository (or whatever else Projectile turns up) for all language servers started inside the repo. However, if you have nested go.mod files, you need to have lsp-mode start separate instances of gopls for each nested go.mod , and use the appropriate one for each file. You can make this work by manually invoking M-x lsp-workspace-folders-add and adding each nested go.mod directory as a workspace folder. Then reloading LSP with M-x lsp in an affected file (or restarting Emacs) will cause the file to be re-associated with a gopls process running under the correct project workspace. See #3473 for a bit more discussion of this particular issue.","title":"Go (gopls)"},{"location":"manual-language-docs/lsp-gopls/#go-gopls","text":"lsp-mode provides Go language support via the gopls language server. See upstream for gopls installation instructions.","title":"Go (gopls)"},{"location":"manual-language-docs/lsp-gopls/#configuration","text":"By default, some gopls analyzers are enabled and others are disabled. To override, use: (setq lsp-go-analyses '((shadow . t) (simplifycompositelit . :json-false)))","title":"Configuration"},{"location":"manual-language-docs/lsp-gopls/#troubleshooting","text":"","title":"Troubleshooting"},{"location":"manual-language-docs/lsp-gopls/#working-with-nested-gomod-files","text":"If you encounter an error like one of these: errors loading workspace: You are working in a nested module. Please open it as a separate workspace folder This file is in %s, which is a nested module in the %s module. gopls currently requires one module per workspace folder. Please open %s as a separate workspace folder Then the problem is most likely because lsp-mode has not started gopls with the correct root directory. By default lsp-mode will pick the root of your whole Git repository (or whatever else Projectile turns up) for all language servers started inside the repo. However, if you have nested go.mod files, you need to have lsp-mode start separate instances of gopls for each nested go.mod , and use the appropriate one for each file. You can make this work by manually invoking M-x lsp-workspace-folders-add and adding each nested go.mod directory as a workspace folder. Then reloading LSP with M-x lsp in an affected file (or restarting Emacs) will cause the file to be re-associated with a gopls process running under the correct project workspace. See #3473 for a bit more discussion of this particular issue.","title":"Working with nested go.mod files"},{"location":"manual-language-docs/lsp-json-ls/","text":"Completions # json-ls (vscode-json-language-server) provides completions for well known files and files which manually specify their JSON Schema using the $schema property. In order for json-ls to provide completions, you need to enable snippet support. To do that, make sure you have installed yasnippet and that you have enabled the yasnippet minor mode.","title":"Completions"},{"location":"manual-language-docs/lsp-json-ls/#completions","text":"json-ls (vscode-json-language-server) provides completions for well known files and files which manually specify their JSON Schema using the $schema property. In order for json-ls to provide completions, you need to enable snippet support. To do that, make sure you have installed yasnippet and that you have enabled the yasnippet minor mode.","title":"Completions"},{"location":"manual-language-docs/lsp-latex/","text":"lsp-latex.el: texlab LSP-client # See lsp-latex.el homepage .","title":"lsp-latex.el: texlab LSP-client"},{"location":"manual-language-docs/lsp-latex/#lsp-latexel-texlab-lsp-client","text":"See lsp-latex.el homepage .","title":"lsp-latex.el: texlab LSP-client"},{"location":"manual-language-docs/lsp-org/","text":"Literate programming using LSP and org-mode(alpha) # lsp-mode provides experimental support for running the language servers inside of org-mode source blocks. lsp-mode is achieving this by obtaining the information about the source block from the source block header(language + :tangle ) then translating the point to the LSP positions back and forth so the language server thinks that Emacs has opened the original file. In order that to work the files has to be present on the disk as well because the server expects to find them. Here it is a sample source block: #+BEGIN_SRC python :tangle \"python.py\" print \"Hello!\" #+END_SRC Demo # Commands # lsp-org start lsp-mode in source buffer. Must be executed with cursor being source block. lsp-virtual-buffer-disconnect turn off lsp-mode . What works # lsp-mode core features (finding references, going to definitions, completion, lenses, highlighting, etc) company-mode flycheck lsp-treemacs-symbols lsp-treemacs-errors-list Known limitations # Incremental updates are performed by sending the whole buffer each time(they simulate full updates). Deleting content that spans across the source block and the content of the org document is not handled. Opening and editing the actual file from the disk might cause undefined behaviour because the server expects file to be open only once. What does not work # dap-mode lsp-ui flymake (?) What's next # Finishing the virtual buffers API . lsp-ui support dap-mode support markdown-mode integration","title":"Literate programming using LSP and org-mode(alpha)"},{"location":"manual-language-docs/lsp-org/#literate-programming-using-lsp-and-org-modealpha","text":"lsp-mode provides experimental support for running the language servers inside of org-mode source blocks. lsp-mode is achieving this by obtaining the information about the source block from the source block header(language + :tangle ) then translating the point to the LSP positions back and forth so the language server thinks that Emacs has opened the original file. In order that to work the files has to be present on the disk as well because the server expects to find them. Here it is a sample source block: #+BEGIN_SRC python :tangle \"python.py\" print \"Hello!\" #+END_SRC","title":"Literate programming using LSP and org-mode(alpha)"},{"location":"manual-language-docs/lsp-org/#demo","text":"","title":"Demo"},{"location":"manual-language-docs/lsp-org/#commands","text":"lsp-org start lsp-mode in source buffer. Must be executed with cursor being source block. lsp-virtual-buffer-disconnect turn off lsp-mode .","title":"Commands"},{"location":"manual-language-docs/lsp-org/#what-works","text":"lsp-mode core features (finding references, going to definitions, completion, lenses, highlighting, etc) company-mode flycheck lsp-treemacs-symbols lsp-treemacs-errors-list","title":"What works"},{"location":"manual-language-docs/lsp-org/#known-limitations","text":"Incremental updates are performed by sending the whole buffer each time(they simulate full updates). Deleting content that spans across the source block and the content of the org document is not handled. Opening and editing the actual file from the disk might cause undefined behaviour because the server expects file to be open only once.","title":"Known limitations"},{"location":"manual-language-docs/lsp-org/#what-does-not-work","text":"dap-mode lsp-ui flymake (?)","title":"What does not work"},{"location":"manual-language-docs/lsp-org/#whats-next","text":"Finishing the virtual buffers API . lsp-ui support dap-mode support markdown-mode integration","title":"What's next"},{"location":"manual-language-docs/lsp-rust-analyzer/","text":"Server note # NOTE: If you are using rustic-mode , you have to change rustic-lsp-server instead of lsp-rust-server , since it also supports eglot as a lightweight alternative to lsp-mode. lsp-rust-server Choose LSP server (default is rust-analyzer) lsp-rust-switch-server Switch priorities of lsp servers rust-analyzer # Commands # lsp-rust-analyzer-syntax-tree # Display syntax tree for current buffer lsp-rust-analyzer-status # Display status information for rust-analyzer lsp-rust-analyzer-join-lines # Join selected lines into one, smartly fixing up whitespace and trailing commas before: after: inlay-hints # lsp-inlay-hints-mode enables displaying of inlay hints Additionally, lsp-inlay-hint-enable must be set to t in order for inlay hints to render. NOTE: the inlay hints interact badly with the lsp-ui sideline, because it doesn't seem to consider the overlays in its width calculation, which often leads to lines wrapping around. Macro expansion # lsp-rust-analyzer-expand-macro expand macro call at point recursively Use your own function for displaying macro expansion by customizing lsp-rust-analyzer-macro-expansion-method Formatted and highlighted result with the default function of rustic. auto-import # Get a list of possible auto import candidates with lsp-execute-code-action Snippet insertion/refactor # To support refactorings that require snippet insertion(eg. generating derive clause etc), make sure that you have enabled yasnippet and yas-minor-mode . If you are using use-package , you can do something like this: ( use-package yasnippet :ensure t :hook (( lsp-mode . yas-minor-mode ))) Open Cargo.toml # lsp-rust-analyzer-open-cargo-toml opens the Cargo.toml closest to the current file. Calling it with a universal argument will open the Cargo.toml in another window. Corresponds to the rust-analyzer LSP extension Open external documentation # lsp-rust-analyzer-open-external-docs opens external documentation related to the current position in a browser. Corresponds to the rust-analyzer LSP extension Find and execute tests related to current position # lsp-rust-analyzer-related-tests find all tests related to the current position, asks for user completion and executes the selected test in a compilation buffer. Corresponds to the rust-analyzer LSP extension In the example below, first you see that: + On the left, the function check_infer is defined, on the right another file is opened with many test functions, some of which call check_infer . With the cursor on check_infer , call lsp-rust-analyzer-related-tests and select infer_pattern_match_slice with fuzzy matching. The test is executed on the right with compilation major mode Move the cursor to fn ellipsize and attempt to find related tests to no avail. Confirm that the function is indeed untested by using swiper and finding one place in the file, where the function is called Caveats # Rust Analyzer does not support disabling snippets - https://github.com/rust-analyzer/rust-analyzer/issues/2518 extract signature # This unmerged PR contains an example method that allows modifying the signature that is displayed by eldoc.","title":"Lsp rust analyzer"},{"location":"manual-language-docs/lsp-rust-analyzer/#server-note","text":"NOTE: If you are using rustic-mode , you have to change rustic-lsp-server instead of lsp-rust-server , since it also supports eglot as a lightweight alternative to lsp-mode. lsp-rust-server Choose LSP server (default is rust-analyzer) lsp-rust-switch-server Switch priorities of lsp servers","title":"Server note"},{"location":"manual-language-docs/lsp-rust-analyzer/#rust-analyzer","text":"","title":"rust-analyzer"},{"location":"manual-language-docs/lsp-rust-analyzer/#commands","text":"","title":"Commands"},{"location":"manual-language-docs/lsp-rust-analyzer/#lsp-rust-analyzer-syntax-tree","text":"Display syntax tree for current buffer","title":"lsp-rust-analyzer-syntax-tree"},{"location":"manual-language-docs/lsp-rust-analyzer/#lsp-rust-analyzer-status","text":"Display status information for rust-analyzer","title":"lsp-rust-analyzer-status"},{"location":"manual-language-docs/lsp-rust-analyzer/#lsp-rust-analyzer-join-lines","text":"Join selected lines into one, smartly fixing up whitespace and trailing commas before: after:","title":"lsp-rust-analyzer-join-lines"},{"location":"manual-language-docs/lsp-rust-analyzer/#inlay-hints","text":"lsp-inlay-hints-mode enables displaying of inlay hints Additionally, lsp-inlay-hint-enable must be set to t in order for inlay hints to render. NOTE: the inlay hints interact badly with the lsp-ui sideline, because it doesn't seem to consider the overlays in its width calculation, which often leads to lines wrapping around.","title":"inlay-hints"},{"location":"manual-language-docs/lsp-rust-analyzer/#macro-expansion","text":"lsp-rust-analyzer-expand-macro expand macro call at point recursively Use your own function for displaying macro expansion by customizing lsp-rust-analyzer-macro-expansion-method Formatted and highlighted result with the default function of rustic.","title":"Macro expansion"},{"location":"manual-language-docs/lsp-rust-analyzer/#auto-import","text":"Get a list of possible auto import candidates with lsp-execute-code-action","title":"auto-import"},{"location":"manual-language-docs/lsp-rust-analyzer/#snippet-insertionrefactor","text":"To support refactorings that require snippet insertion(eg. generating derive clause etc), make sure that you have enabled yasnippet and yas-minor-mode . If you are using use-package , you can do something like this: ( use-package yasnippet :ensure t :hook (( lsp-mode . yas-minor-mode )))","title":"Snippet insertion/refactor"},{"location":"manual-language-docs/lsp-rust-analyzer/#open-cargotoml","text":"lsp-rust-analyzer-open-cargo-toml opens the Cargo.toml closest to the current file. Calling it with a universal argument will open the Cargo.toml in another window. Corresponds to the rust-analyzer LSP extension","title":"Open Cargo.toml"},{"location":"manual-language-docs/lsp-rust-analyzer/#open-external-documentation","text":"lsp-rust-analyzer-open-external-docs opens external documentation related to the current position in a browser. Corresponds to the rust-analyzer LSP extension","title":"Open external documentation"},{"location":"manual-language-docs/lsp-rust-analyzer/#find-and-execute-tests-related-to-current-position","text":"lsp-rust-analyzer-related-tests find all tests related to the current position, asks for user completion and executes the selected test in a compilation buffer. Corresponds to the rust-analyzer LSP extension In the example below, first you see that: + On the left, the function check_infer is defined, on the right another file is opened with many test functions, some of which call check_infer . With the cursor on check_infer , call lsp-rust-analyzer-related-tests and select infer_pattern_match_slice with fuzzy matching. The test is executed on the right with compilation major mode Move the cursor to fn ellipsize and attempt to find related tests to no avail. Confirm that the function is indeed untested by using swiper and finding one place in the file, where the function is called","title":"Find and execute tests related to current position"},{"location":"manual-language-docs/lsp-rust-analyzer/#caveats","text":"Rust Analyzer does not support disabling snippets - https://github.com/rust-analyzer/rust-analyzer/issues/2518","title":"Caveats"},{"location":"manual-language-docs/lsp-rust-analyzer/#extract-signature","text":"This unmerged PR contains an example method that allows modifying the signature that is displayed by eldoc.","title":"extract signature"},{"location":"manual-language-docs/lsp-rust-rls/","text":"RLS # Customization # This is an incomplete list of the available options lsp-rust-rls-server-command change command to start RLS lsp-rust-show-hover-context turn off hover tooltips rustfmt # Code formatting with rustfmt can be configured with: lsp-rust-rustfmt-path change default path for rustfmt executable To enable automatic code format on save, add this to your init.el ( rust-mode is assumed to be installed): (add-hook 'before-save-hook (lambda () (when (eq 'rust-mode major-mode) (lsp-format-buffer))))","title":"Lsp rust rls"},{"location":"manual-language-docs/lsp-rust-rls/#rls","text":"","title":"RLS"},{"location":"manual-language-docs/lsp-rust-rls/#customization","text":"This is an incomplete list of the available options lsp-rust-rls-server-command change command to start RLS lsp-rust-show-hover-context turn off hover tooltips","title":"Customization"},{"location":"manual-language-docs/lsp-rust-rls/#rustfmt","text":"Code formatting with rustfmt can be configured with: lsp-rust-rustfmt-path change default path for rustfmt executable To enable automatic code format on save, add this to your init.el ( rust-mode is assumed to be installed): (add-hook 'before-save-hook (lambda () (when (eq 'rust-mode major-mode) (lsp-format-buffer))))","title":"rustfmt"},{"location":"manual-language-docs/lsp-sqls/","text":"Sample configuration: # ( add-hook 'sql-mode-hook 'lsp ) ( setq lsp-sqls-workspace-config-path nil ) ( setq lsp-sqls-connections ' ((( driver . \"mysql\" ) ( dataSourceName . \"yyoncho:local@tcp(localhost:3306)/foo\" )) (( driver . \"mssql\" ) ( dataSourceName . \"Server=localhost;Database=sammy;User Id=yyoncho;Password=hunter2;\" )) (( driver . \"postgresql\" ) ( dataSourceName . \"host=127.0.0.1 port=5432 user=yyoncho password=local dbname=sammy sslmode=disable\" )))) Alternatively, you can leave lsp-sqls-workspace-config-path to the default \"workspace\" value, and put a json file in