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
* update: neovim install instructions
* update: neovim configuration instructions
* chore: styling
* suggested neovim config changes as per DrKJeff
* update link for learning more about neovim config
Copy file name to clipboardExpand all lines: src/content/wiki/configuration.mdx
+33-6Lines changed: 33 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ Other settings like [`workspace.library`](/wiki/settings#workspace-library) _sho
44
44
45
45
### Neovim
46
46
47
-
Below are some examples for getting set up in Neovim in different environments.
47
+
Below are some examples for getting set up in Neovim using different tools:
48
48
49
49
<AccordionGroup>
50
50
<Accordion>
@@ -55,21 +55,45 @@ Below are some examples for getting set up in Neovim in different environments.
55
55
Below is a minimal example showing how to set the runtime version of the language server.
56
56
57
57
```Lua
58
-
require'lspconfig'.lua_ls.setup{
58
+
vim.lsp.config('lua_ls', {
59
+
cmd= { 'lua-language-server' },
60
+
filetypes= { 'lua' },
61
+
-- Sets the "workspace" to the directory where any of these files is found.
62
+
root_markers= {
63
+
".luarc.json",
64
+
".luarc.jsonc",
65
+
".luacheckrc",
66
+
".stylua.toml",
67
+
".git",
68
+
},
59
69
settings= {
60
70
Lua= {
61
71
runtime= {
62
-
version="LuaJIT"
72
+
version='LuaJIT',
63
73
}
64
74
}
65
75
}
66
-
}
76
+
})
77
+
78
+
-- Now that the language server is configured, it must be enabled
79
+
vim.lsp.enable('lua_ls')
67
80
```
68
81
82
+
See [github.com/neovim/nvim-lspconfig](https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#lua_ls) for a more detailed example.
83
+
69
84
And here is an example that can be used when using Luarocks:
0 commit comments