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

Implement basic nested language detection support #1159

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
8 changes: 7 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,13 @@ jobs:
name: Build on ${{matrix.os}} for ${{ matrix.label }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
if: ${{ github.event_name == 'pull_request' }}
with:
ref: ${{ github.event.pull_request.head.sha }}

- uses: actions/checkout@v4
if: ${{ github.event_name == 'push' }}

# setup .NET per the repo global.json
- name: Setup .NET
Expand Down
15 changes: 2 additions & 13 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"args": [
"--debug",
"--filter",
"FSAC.lsp.${input:loader}.${input:lsp-server}.${input:testName}"
"FSAC.lsp.${input:loader}.${input:testName}"
]
}
],
Expand All @@ -77,21 +77,10 @@
"default": "WorkspaceLoader",
"type": "pickString"
},

{
"id": "lsp-server",
"description": "The lsp serrver",
"options": [
"FSharpLspServer",
"AdaptiveLspServer"
],
"default": "AdaptiveLspServer",
"type": "pickString"
},
{
"id": "testName",
"description": "the name of the test as provided to `testCase`",
"type": "promptString"
}
]
}
}
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "7.0.400",
"allowPrerelease": true
"rollForward": "major"
}
}
4 changes: 4 additions & 0 deletions src/FsAutoComplete.Core/Commands.fs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ type NotificationEvent =
| Canceled of errorMessage: string
| FileParsed of string<LocalPath>
| TestDetected of file: string<LocalPath> * tests: TestAdapter.TestAdapterEntry<range>[]
| NestedLanguagesFound of
file: string<LocalPath> *
version: int *
nestedLanguages: NestedLanguages.NestedLanguageDocument array

module Commands =
open System.Collections.Concurrent
Expand Down
2 changes: 2 additions & 0 deletions src/FsAutoComplete.Core/FsAutoComplete.Core.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<TargetFrameworks Condition="'$(BuildNet7)' == 'true'">net6.0;net7.0</TargetFrameworks>
<TargetFrameworks Condition="'$(BuildNet8)' == 'true'">net6.0;net7.0;net8.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<LangVersion>preview</LangVersion>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\FsAutoComplete.Logging\FsAutoComplete.Logging.fsproj" />
Expand Down Expand Up @@ -58,6 +59,7 @@
<Compile Include="SignatureHelp.fs" />
<Compile Include="InlayHints.fs" />
<Compile Include="SymbolLocation.fs" />
<Compile Include="NestedLanguages.fs" />
<Compile Include="Commands.fs" />
</ItemGroup>
<Import Project="..\..\.paket\Paket.Restore.targets" />
Expand Down
Loading
Loading