mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-04-27 03:47:37 +00:00
lsp/presets/fsautocomplete: init
This commit is contained in:
parent
cf5928d941
commit
3aa1b7a9d6
2 changed files with 55 additions and 0 deletions
|
|
@ -7,6 +7,7 @@
|
|||
./bash-language-server.nix
|
||||
./deno.nix
|
||||
./emmet-ls.nix
|
||||
./fsautocomplete.nix
|
||||
./gleam.nix
|
||||
./glsl_analyzer.nix
|
||||
./gopls.nix
|
||||
|
|
|
|||
54
modules/plugins/lsp/presets/fsautocomplete.nix
Normal file
54
modules/plugins/lsp/presets/fsautocomplete.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
|
||||
cfg = config.vim.lsp.presets.fsautocomplete;
|
||||
in {
|
||||
options.vim.lsp.presets.fsautocomplete = {
|
||||
enable = mkEnableOption "the F# Autocomplete Language Server";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
vim.lsp.servers.fsautocomplete = {
|
||||
enable = true;
|
||||
cmd = [(getExe pkgs.fsautocomplete) "--adaptive-lsp-server-enabled"];
|
||||
root_dir = mkLuaInline ''
|
||||
function(bufnr, on_dir)
|
||||
on_dir(vim.fs.root(bufnr, function(name, path)
|
||||
return name == ".git" or name:match("%.sln$") or name:match("%.fsproj$")
|
||||
end))
|
||||
end
|
||||
'';
|
||||
init_options = {
|
||||
AutomaticWorkspaceInit = true;
|
||||
};
|
||||
settings = {
|
||||
FSharp = {
|
||||
keywordsAutocomplete = true;
|
||||
ExternalAutocomplete = false;
|
||||
Linter = true;
|
||||
UnionCaseStubGeneration = true;
|
||||
UnionCaseStubGenerationBody = ''failwith "Not Implemented"'';
|
||||
RecordStubGeneration = true;
|
||||
RecordStubGenerationBody = ''failwith "Not Implemented"'';
|
||||
InterfaceStubGeneration = true;
|
||||
InterfaceStubGenerationObjectIdentifier = "this";
|
||||
InterfaceStubGenerationMethodBody = ''failwith "Not Implemented"'';
|
||||
UnusedOpensAnalyzer = true;
|
||||
UnusedDeclarationsAnalyzer = true;
|
||||
UseSdkScripts = true;
|
||||
SimplifyNameAnalyzer = true;
|
||||
ResolveNamespaces = true;
|
||||
EnableReferenceCodeLens = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue