Lines Matching +refs:lsp +refs:mlir +refs:server +refs:executable

6 [LSP](https://microsoft.github.io/language-server-protocol/) IDE language
8 generally comprised of two components; a language client and a language server.
10 using, such as VSCode. A language server acts as the backend for queries that
14 ## MLIR LSP Language Server : `mlir-lsp-server`
16 MLIR provides an implementation of an LSP language server for `.mlir` text files
17 in the form of the `mlir-lsp-server` tool. This tool interacts with the MLIR C++
22 `mlir-lsp-server`, like many other MLIR based tools, relies on having the
24 formats used in the textual .mlir files. The `mlir-lsp-server` found within the
27 `mlir-lsp-server` executable that registers the entities that they are
28 interested in. The implementation of `mlir-lsp-server` is provided as a library,
33 #include "mlir/Tools/mlir-lsp-server/MlirLspServerMain.h"
36 mlir::DialectRegistry registry;
38 return mlir::failed(mlir::MlirLspServerMain(argc, argv, registry));
47 This section details a few of the features that the MLIR language server
51 [mlir features]: #
55 The language server actively runs verification on the IR as you type, showing
58 ![IMG](/mlir-lsp-server/diagnostics.png)
63 [infrastructure](https://mlir.llvm.org/docs/Diagnostics/#sourcemgr-diagnostic-verifier-handler)
65 parsing and verification. The language server provides code actions for
68 ![IMG](/mlir-lsp-server/diagnostics_action.gif)
72 The language server provides suggestions as you type, offering completions for
76 ![IMG](/mlir-lsp-server/code_complete.gif)
91 ![SSA](/mlir-lsp-server/goto_def_ssa.gif)
95 ![Symbols](/mlir-lsp-server/goto_def_symbol.gif)
101 ![External Locations](/mlir-lsp-server/goto_def_external.gif)
107 ![IMG](/mlir-lsp-server/find_references.gif)
115 ![IMG](/mlir-lsp-server/hover.png)
119 The language server will also inform the editor about the structure of symbol
123 ![IMG](/mlir-lsp-server/navigation.gif)
127 The language server provides support for interacting with MLIR bytecode files,
129 as textual `.mlir` files.
131 ![IMG](/mlir-lsp-server/bytecode_edit.gif)
133 ## PDLL LSP Language Server : `mlir-pdll-lsp-server`
135 MLIR provides an implementation of an LSP language server for `.pdll` text files
136 in the form of the `mlir-pdll-lsp-server` tool. This tool interacts with the
145 server relies on a compilation database to provide build-system information for
147 available for that file. This database allows for the server to interact with
160 filepath: "/home/user/llvm/mlir/lib/Dialect/Arith/IR/ArithCanonicalization.pdll"
161 includes: "/home/user/llvm/mlir/lib/Dialect/Arith/IR;/home/user/llvm/mlir/include"
177 This section details a few of the features that the PDLL language server
185 The language server actively runs verification as you type, showing any
188 ![IMG](/mlir-pdll-lsp-server/diagnostics.png)
192 The language server provides suggestions as you type based on what constraints,
193 rewrites, dialects, operations, etc are available in this context. The server
197 ![IMG](/mlir-pdll-lsp-server/code_complete.gif)
207 ![IMG](/mlir-pdll-lsp-server/goto_def.gif)
212 ![IMG](/mlir-pdll-lsp-server/goto_def_ods.gif)
218 ![IMG](/mlir-pdll-lsp-server/find_references.gif)
225 ![IMG](/mlir-pdll-lsp-server/hover.png)
230 ![IMG](/mlir-pdll-lsp-server/hover_ods.png)
234 The language server will also inform the editor about the structure of symbols
237 ![IMG](/mlir-pdll-lsp-server/navigation.gif)
241 The language server provides support for introspecting various intermediate
242 stages of compilation, such as the AST, the `.mlir` containing the generated
246 ![IMG](/mlir-pdll-lsp-server/view_output.gif)
250 The language server provides additional information inline with the source code.
258 ![IMG](/mlir-pdll-lsp-server/inlay_hints.png)
260 ## TableGen LSP Language Server : `tblgen-lsp-server`
262 MLIR provides an implementation of an LSP language server for `.td` text files
263 in the form of the `tblgen-lsp-server` tool. This tool interacts with the
271 server relies on a compilation database to provide build-system information for
273 available for that file. This database allows for the server to interact with
286 filepath: "/home/user/llvm/mlir/lib/Dialect/Arith/IR/ArithCanonicalization.td"
287 includes: "/home/user/llvm/mlir/lib/Dialect/Arith/IR;/home/user/llvm/mlir/include"
303 This section details a few of the features that the TableGen language server
311 The language server actively runs verification as you type, showing any
314 ![IMG](/tblgen-lsp-server/diagnostics.png)
324 ![IMG](/tblgen-lsp-server/goto_def.gif)
330 ![IMG](/tblgen-lsp-server/find_references.gif)
337 ![IMG](/tblgen-lsp-server/hover_def.png)
342 ![IMG](/tblgen-lsp-server/hover_field.png)
353 ![Index Map Example](/includes/img/mlir-lsp-server-server_diagram.svg)
357 The language server, such as `mlir-lsp-server`, communicates with the language
372 [`Language-Specific Server`](#language-specific-server) for processing. The
381 The language specific server, such as `MLIRServer` or `PDLLServer`, provides the
395 …extension](https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-mlir)
396 provides language IDE features for [MLIR](https://mlir.llvm.org/) related
397 languages: [MLIR](#mlir---mlir-textual-assembly-format),
398 [PDLL](#pdll---mlir-pdll-pattern-files), and [TableGen](#td---tablegen-files)
400 #### `.mlir` - MLIR textual assembly format:
403 [MLIR textual assembly format](https://mlir.llvm.org/docs/LangRef/):
407 - Syntax highlighting for `.mlir` files and `mlir` markdown blocks
414 [mlir-vscode features]: #
418 ###### `mlir-lsp-server`
420 The various `.mlir` language features require the
421 [`mlir-lsp-server` language server](https://mlir.llvm.org/docs/Tools/MLIRLSP/#mlir-lsp-language-ser…
422 If `mlir-lsp-server` is not found within your workspace path, you must specify
423 the path of the server via the `mlir.server_path` setting. The path of the
424 server may be absolute or relative within your workspace.
429 [PDLL pattern language](https://mlir.llvm.org/docs/PDLL/).
443 ###### `mlir-pdll-lsp-server`
446 [`mlir-pdll-lsp-server` language server](https://mlir.llvm.org/docs/Tools/MLIRLSP/#pdll-lsp-languag…
447 If `mlir-pdll-lsp-server` is not found within your workspace path, you must
448 specify the path of the server via the `mlir.pdll_server_path` setting. The path
449 of the server may be absolute or relative within your workspace.
453 To properly understand and interact with `.pdll` files, the language server must
455 [`pdll_compile_commands.yml` files](https://mlir.llvm.org/docs/Tools/MLIRLSP/#compilation-database)
458 server will attempt to find them within your `build/` directory. If not
460 may be specified via the `mlir.pdll_compilation_databases` setting. The paths of
478 ###### `tblgen-lsp-server`
481 [`tblgen-lsp-server` language server](https://mlir.llvm.org/docs/Tools/MLIRLSP/#tablegen-lsp-langua…
482 If `tblgen-lsp-server` is not found within your workspace path, you must specify
483 the path of the server via the `mlir.tablegen_server_path` setting. The path of
484 the server may be absolute or relative within your workspace.
488 To properly understand and interact with `.td` files, the language server must
490 [`tablegen_compile_commands.yml` files](https://mlir.llvm.org/docs/Tools/MLIRLSP/#compilation-datab…
493 server will attempt to find them within your `build/` directory. If not
495 files may be specified via the `mlir.tablegen_compilation_databases` setting.
502 [`mlir/utils/vscode`](https://github.com/llvm/llvm-project/tree/main/mlir/utils/vscode).
511 - Copy `mlir/utils/textmate/mlir.json` to the extension directory and rename to
516 `https://mlir.llvm.org//LogoAssets/logo/PNG/full_color/mlir-identity-03.png`