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

fix(uri): don't use full path for custom schema #1

Closed
wants to merge 1 commit into from
Closed

Conversation

sigmaSd
Copy link
Owner

@sigmaSd sigmaSd commented Aug 14, 2022

deno lsp uses a custom schema deno:

uri_from_bufnr returns the full path of the buf file but this doesn't work with custom schema

This fixes the last remaining bug here neovim/nvim-lspconfig#2005 relative dependencies inside virtual text document is not resolved correctly

Notes:

  • maybe if relative_name:match("deno:") should become if is_custom_schema(realtive_name) where is_custom_schema is true for any schema that matches URI_SCHEME_PATTERN but is not equal to file:///
  • this change fixes all my issues with denols (with some minor modifications that I can pr later)

This is more to start a discussion I thought showing code is easier to discuss then raising an issue

deno lsp uses a custom schema `deno:`

`uri_from_bufnr` returns the full path of the buf file but this doesn't work with custom schema

This fixes the last remaining  bug here <neovim/nvim-lspconfig#2005> `relative dependencies inside virtual text document is not resolved correctly`

Notes:
- maybe `if relative_name:match("deno:")` should become `if is_custom_schema(realtive_name)` where is_custom_schema matches `URI_SCHEME_PATTERN` but is not equal to `file:///`
- this changes fixes all my issues with denols (with some minor modifications that I can pr later)

This is more to start a discussion I thought showing code is easier to discuss then raising an issue
@sigmaSd sigmaSd closed this Aug 14, 2022
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.

1 participant