Giter VIP home page Giter VIP logo

Comments (5)

natebosch avatar natebosch commented on May 14, 2024

Curiously in your last example the () are not encoded...

I think I can go with a relatively straightforward encode strategy since we expect the entire file path to be treated as the path component from the URI spec.

  1. Allow unreserved characters
  2. Allow / unescaped
  3. Escape all other characters. Expect that all characters are ascii

My first approach for decoding will probably only handle %nn style encodings. Handling other cases like translating + to space or %% to % could be trickier since it's less general.

from vim-lsc.

natebosch avatar natebosch commented on May 14, 2024

Can you try updating to the latest and see if it works for you?

from vim-lsc.

neowit avatar neowit commented on May 14, 2024

Hello @natebosch ,

Thank you for the update, looks good.
URI encoding for messages like textDocument/definition or textDocument/didOpen appears to be working, but there is one case (I found so far) where URI encoding does not get applied:

{"method":"initialize","jsonrpc":"2.0","id":1,"params":{"rootUri":"file:///Users/tester/projects/Sforce - SFDC Experiments/SForce (lsc-test)/src/classes","capabilities":{...}}

I think this line:

      \ 'rootUri': 'file://'.getcwd(),

should look something like like this:

      \ 'rootUri': lsc#uri#documentUri(getcwd()),

Curiously in your last example the () are not encoded...

that's my bad. Thank you for highlighting this.

from vim-lsc.

natebosch avatar natebosch commented on May 14, 2024

Good catch on the rootUri. Should be fixed now.

from vim-lsc.

neowit avatar neowit commented on May 14, 2024

That's great, thank you.

from vim-lsc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.