Skip to content

Fix go to def not correct #32

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

Merged
merged 2 commits into from
Aug 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tiny-pigs-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"css-variables-language-server": patch
---

Fix go to definition
24 changes: 12 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

# - name: Publish to VSCode Marketplace
# if: steps.changesets.outputs.published == 'true'
# working-directory: ./packages/vscode-css-variables
# run: |
# npm i
# npx vsce publish -p ${{ secrets.VSCE_TOKEN }}
# - name: Publish to OpenVSX
# if: steps.changesets.outputs.published == 'true'
# working-directory: ./packages/vscode-css-variables
# run: |
# npm i
# npx ovsx publish -p ${{ secrets.OVSX_TOKEN }}
- name: Publish to VSCode Marketplace
if: steps.changesets.outputs.published == 'true'
working-directory: ./packages/vscode-css-variables
run: |
npm i
npx vsce publish -p ${{ secrets.VSCE_PAT }}
- name: Publish to OpenVSX
if: steps.changesets.outputs.published == 'true'
working-directory: ./packages/vscode-css-variables
run: |
npm i
npx ovsx publish -p ${{ secrets.OVSX_TOKEN }}
13 changes: 8 additions & 5 deletions packages/css-variables-language-server/src/CSSVariableManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default class CSSVariableManager {

if (match) {
const url = `${match.groups.protocol}://${match.groups.url}`;

importUrls.push(url);
}
}
Expand All @@ -81,7 +81,7 @@ export default class CSSVariableManager {
importUrls.map(async (url) => {
try {
const response = await axios(url, {
responseType: "text"
responseType: 'text',
});

const cssText = await response.data;
Expand All @@ -107,10 +107,13 @@ export default class CSSVariableManager {
uri: fileURI,
range: Range.create(
Position.create(
decl.source.start.line,
decl.source.start.column
decl.source.start.line - 1,
decl.source.start.column - 1
),
Position.create(decl.source.end.line, decl.source.end.column)
Position.create(
decl.source.end.line - 1,
decl.source.end.column - 1
)
),
},
};
Expand Down