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
Copy file name to clipboardExpand all lines: src/getting-started.md
+56-10Lines changed: 56 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -43,30 +43,48 @@ A screenshot of the Flix Visual Studio Code extension in action:
43
43
44
44
### Using Flix from Neovim
45
45
46
-
Flix can also be used from [Neovim](https://neovim.io/).
47
-
48
-
Follow these steps to get started:
46
+
Flix can also be used from [Neovim](https://neovim.io/). Follow these steps to
47
+
get started:
49
48
50
49
#### Step 1: Install Neovim (v0.9 +)
51
50
52
51
Install Neovim using your preferred package manager or follow the [official installation guide](https://github.com/neovim/neovim/blob/master/INSTALL.md).
53
52
53
+
You can check if Neovim is installed and its version by running:
54
+
55
+
```shell
56
+
nvim --version
57
+
```
58
+
54
59
#### Step 2: Add nvim-lspconfig plugin to your Neovim
55
60
56
-
Install the `nvim-lspconfig` plugin using your preferred Neovim plugin manager. If you are not using a plugin manager, you can install it manually by running the following command (assuming your Neovim configuration directory is `~/.config/nvim`):
61
+
Install the `nvim-lspconfig` plugin using your preferred Neovim plugin manager.
62
+
63
+
If you are not using a plugin manager, you can install it manually by running
64
+
the following command (assuming your Neovim configuration directory is
When you open a `*.flix` file in Neovim (with `flix.jar` in the same directory), you should see the message “Flix LSP attached to buffer <buffer_number>” in the status line. This indicates that the language server is running correctly.
128
+
If you are on Windows, the file should be stored at:
129
+
130
+
```shell
131
+
C:/Users/<USER>/AppData/Local/nvim/init.lua
132
+
```
133
+
134
+
You can verify that `nvim-lspconfig` and the Flix language server is installed
135
+
correctly by running: `nvim` and then running the command `:LspInfo`.
136
+
137
+
#### Step 4: Programming with Flix with Neovim
138
+
139
+
You can now open any `*.flix` file provided that the Flix compiler jar
140
+
(`flix.jar`) is located in the same directory as the Flix.
141
+
142
+
When you open a Flix, you should see message "Flix LSP attached to buffer
143
+
<buffer_number>" in the status line. Moreover, the opened file should be syntax
144
+
highlighted.
145
+
146
+
The default Flix LSP configuration includes the following keybindings:
112
147
113
-
At this stage, syntax highlighting and LSP features should function as expected. You can access all LSP functionalities using the predefined key bindings in normal mode, with `\` as the default leader key.
0 commit comments