diff options
Diffstat (limited to 'lua/lspconfig/fsautocomplete.lua')
| -rw-r--r-- | lua/lspconfig/fsautocomplete.lua | 23 |
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'} -} -``` ]]; }; } |
