[ci] yarn format
This commit is contained in:
parent
06edbd1aad
commit
8f1acf57a5
5 changed files with 21 additions and 13 deletions
|
@ -37,7 +37,7 @@ export default async function build(...args) {
|
|||
outdir,
|
||||
external,
|
||||
format,
|
||||
plugins: [svelte({ isDev })]
|
||||
plugins: [svelte({ isDev })],
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ export default async function build(...args) {
|
|||
outdir,
|
||||
external,
|
||||
format,
|
||||
plugins: [svelte({ isDev })]
|
||||
plugins: [svelte({ isDev })],
|
||||
});
|
||||
|
||||
process.on('beforeExit', () => {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# astro-languageserver
|
||||
|
||||
## 0.4.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 06e2597: Adds support for import suggestions
|
||||
|
|
|
@ -26,11 +26,12 @@ export class CompletionsProviderImpl implements CompletionsProvider<CompletionEn
|
|||
const fragment = await tsDoc.getFragment();
|
||||
|
||||
const offset = document.offsetAt(position);
|
||||
const entries = lang.getCompletionsAtPosition(fragment.filePath, offset, {
|
||||
importModuleSpecifierPreference: 'relative',
|
||||
importModuleSpecifierEnding: 'js',
|
||||
quotePreference: 'single',
|
||||
})?.entries || [];
|
||||
const entries =
|
||||
lang.getCompletionsAtPosition(fragment.filePath, offset, {
|
||||
importModuleSpecifierPreference: 'relative',
|
||||
importModuleSpecifierEnding: 'js',
|
||||
quotePreference: 'single',
|
||||
})?.entries || [];
|
||||
|
||||
const completionItems = entries
|
||||
.map((entry: ts.CompletionEntry) => this.toCompletionItem(fragment, entry, document.uri, position, new Set()))
|
||||
|
|
|
@ -72,11 +72,15 @@ async function createLanguageService(tsconfigPath: string, workspaceRoot: string
|
|||
|
||||
let projectVersion = 0;
|
||||
|
||||
const snapshotManager = new SnapshotManager(project.fileNames, {
|
||||
exclude: ['node_modules', 'dist'],
|
||||
include: ['src']
|
||||
}, workspaceRoot || process.cwd());
|
||||
|
||||
const snapshotManager = new SnapshotManager(
|
||||
project.fileNames,
|
||||
{
|
||||
exclude: ['node_modules', 'dist'],
|
||||
include: ['src'],
|
||||
},
|
||||
workspaceRoot || process.cwd()
|
||||
);
|
||||
|
||||
const astroModuleLoader = createAstroModuleLoader(getScriptSnapshot, {});
|
||||
|
||||
const host: ts.LanguageServiceHost = {
|
||||
|
@ -97,7 +101,7 @@ async function createLanguageService(tsconfigPath: string, workspaceRoot: string
|
|||
getProjectVersion: () => `${projectVersion}`,
|
||||
getScriptFileNames: () => Array.from(new Set([...snapshotManager.getFileNames(), ...snapshotManager.getProjectFileNames()])),
|
||||
getScriptSnapshot,
|
||||
getScriptVersion: (fileName: string) => getScriptSnapshot(fileName).version.toString()
|
||||
getScriptVersion: (fileName: string) => getScriptSnapshot(fileName).version.toString(),
|
||||
};
|
||||
|
||||
const languageService: ts.LanguageService = ts.createLanguageService(host);
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
# astro-vscode
|
||||
|
||||
## 0.4.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated VS Code Marketplace banner
|
||||
|
||||
## 0.4.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 06e2597: Adds support for import suggestions
|
||||
|
|
Loading…
Reference in a new issue