aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorAdelar da Silva Queiróz <adelarsq@gmail.com>2021-06-11 23:32:10 -0300
committerMichael Lingelbach <m.j.lbach@gmail.com>2021-06-13 01:46:29 -0700
commit7d5e39cfa64a64cadf0e8295a3984cac8fa6002d (patch)
treef961e0d4292cec8102a342a1e185aa74264abc77 /lua
parentMerge pull request #962 from bch29/master (diff)
downloadnvim-lspconfig-7d5e39cfa64a64cadf0e8295a3984cac8fa6002d.tar
nvim-lspconfig-7d5e39cfa64a64cadf0e8295a3984cac8fa6002d.tar.gz
nvim-lspconfig-7d5e39cfa64a64cadf0e8295a3984cac8fa6002d.tar.bz2
nvim-lspconfig-7d5e39cfa64a64cadf0e8295a3984cac8fa6002d.tar.lz
nvim-lspconfig-7d5e39cfa64a64cadf0e8295a3984cac8fa6002d.tar.xz
nvim-lspconfig-7d5e39cfa64a64cadf0e8295a3984cac8fa6002d.tar.zst
nvim-lspconfig-7d5e39cfa64a64cadf0e8295a3984cac8fa6002d.zip
docs(fsautocomplete): update installation
* Add global binary name as default cmd
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/fsautocomplete.lua23
1 files changed, 10 insertions, 13 deletions
diff --git a/lua/lspconfig/fsautocomplete.lua b/lua/lspconfig/fsautocomplete.lua
index 5ae42d30..35d04986 100644
--- a/lua/lspconfig/fsautocomplete.lua
+++ b/lua/lspconfig/fsautocomplete.lua
@@ -1,8 +1,11 @@
local configs = require 'lspconfig/configs'
local util = require 'lspconfig/util'
-configs.fsautocomplete = {
+local server_name = "fsautocomplete"
+
+configs[server_name] = {
default_config = {
+ cmd = {'dotnet', 'fsautocomplete', '--background-service-enabled'};
root_dir = util.root_pattern('*.sln', '*.fsproj', '.git');
filetypes = {'fsharp'};
init_options = {
@@ -13,26 +16,20 @@ configs.fsautocomplete = {
description = [[
https://github.com/fsharp/FsAutoComplete
-Language Server for F# provded by FsAutoComplete (FSAC).
-
-Download a release of FsAutoComplete from [here](https://github.com/fsharp/FsAutoComplete/releases).
-Instructions to compile from source are found on the main repository.
+Language Server for F# provided by FsAutoComplete (FSAC).
FsAutoComplete requires the [dotnet-sdk](https://dotnet.microsoft.com/download) to be installed.
+The prefered way to install FsAutoComplete is with `dotnet tool install --global fsautocomplete`.
+
+Instructions to compile from source are found on the main [repository](https://github.com/fsharp/FsAutoComplete).
+
You may also need to configure the filetype as Vim defaults to Forth for `*.fs` files:
`autocmd BufNewFile,BufRead *.fs,*.fsx,*.fsi set filetype=fsharp`
-This is automatically done by plugins such as [vim-polyglot](https://github.com/sheerun/vim-polyglot), [PhilT/vim-fsharp](https://github.com/PhilT/vim-fsharp) or [fsharp/vim-fsharp](https://github.com/fsharp/vim-fsharp).
-
-**By default, this config doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set `cmd` to the absolute path ($HOME and ~ are not expanded) of your unzipped and compiled fsautocomplete.dll.
+This is automatically done by plugins such as [PhilT/vim-fsharp](https://github.com/PhilT/vim-fsharp), [fsharp/vim-fsharp](https://github.com/fsharp/vim-fsharp), and [adelarsq/neofsharp.vim](https://github.com/adelarsq/neofsharp.vim).
-```lua
-require'lspconfig'.fsautocomplete.setup{
- cmd = {'dotnet', 'path/to/fsautocomplete.dll', '--background-service-enabled'}
-}
-```
]];
};
}