Skip to content

Commit

Permalink
fix ionide#75: Add root_dir pattern for "*.fsx"
Browse files Browse the repository at this point in the history
Per discussion in ionide#75, the LSP server is not started when opening a bare
.fsx file (not in a directory with a git repo, project, or solution
file), at least with some installations and setups.

Add wildcard pattern to match a root directory when it contains any
"*.fsx" files, which, tautologically, and script file will match. Tested
that this does start the server automatically for bare script files.
  • Loading branch information
greggyb committed May 18, 2024
1 parent d94dd8f commit 5c6e5b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/ionide/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ local function get_default_config()
result.name = "ionide"
result.cmd = vim.g['fsharp#fsautocomplete_command']
result.cmd_env = { DOTNET_ROLL_FORWARD = "LatestMajor" }
result.root_dir = util.root_pattern("*.sln", "*.fsproj", ".git")
result.root_dir = util.root_pattern("*.sln", "*.fsproj", ".git", "*.fsx")
result.filetypes = {"fsharp"}
result.autostart = true
result.handlers = create_handlers()
Expand Down

0 comments on commit 5c6e5b6

Please sign in to comment.