Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

draft: feat: enable F# LSP for *.fsx files on any folder #2611

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adelarsq
Copy link
Contributor

I have used this config for some time. I think that can be added to the default configs, since I didn't notice drawbacks:

local util = require 'lspconfig.util'
lspconfig.fsautocomplete.setup({
    on_attach = my_on_attach,
    root_dir = util.root_pattern('*.sln', '*.fsproj', '.git', '*.fsx'),
    capabilities = my_capabilities,
    filetypes = { 'fsharp' }
})

Note: I have closed the previous PR to satisfy the lint.

@glepnir
Copy link
Member

glepnir commented May 13, 2023

.fsx is fsharp script file right ? I don't think pass it as root dir pattern is correct.

@adelarsq
Copy link
Contributor Author

@glepnir Yes. Is there any other way to provide the root dir for the LSP on this case? The only way that has worked so far was like that.

@adelarsq adelarsq changed the title feat: enable F# LSP for *.fsx files on any folder draft: feat: enable F# LSP for *.fsx files on any folder May 13, 2023
@adelarsq adelarsq marked this pull request as draft May 13, 2023 21:33
@glepnir
Copy link
Member

glepnir commented May 14, 2023

does this script file can be outside fsharp project?

@adelarsq
Copy link
Contributor Author

@glepnir Yes. *.fsx files can be used that same way that *.sh are used.

With .NET installed you can use something like dotnet fsi somefile.fsx.

@glepnir
Copy link
Member

glepnir commented May 15, 2023

okay. can you try set it into filetype and config dotnet support single file mode ?

@adelarsq
Copy link
Contributor Author

@glepnir Cool idea! I will try to make it to work. For now I will keep this PR as draft

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants