Giter Club home page Giter Club logo

Comments (5)

sriharshachilakapati avatar sriharshachilakapati commented on July 21, 2024

This is because of incorrect understanding of VS-Code plugin architecture. I didn't know that VSCode will strip the section name and give only the rest.

From NVIM, I have to pass this configuration instead:

let config =
    \ { 'autoStartPscIde': v:true
    \ , 'pscIdePort': v:null
    \ , 'autocompleteAddImport': v:true
    \ , 'pursExe': 'purs'
    \ , 'addNpmPath': v:true
    \ }

I also cannot find the use of the string trace.server in the language server, so I guess it is VS Code's plugin parameter and not for the language server. The best I can do instead is to set LanguageClient's options:

let g:LanguageClient_trace="verbose"
let g:LanguageClient_loggingLevel="INFO"

Got confused by this because I have to send the prefix purescript. to commands. Can this be added to the readme file to avoid confusion?

from purescript-language-server.

sriharshachilakapati avatar sriharshachilakapati commented on July 21, 2024

But even after changing the configuration to that, this is not being picked up. New traces.

[LC] Project root: /Users/sriharshachilakapati/Projects/*****-*******-****
[LC] [Info] Starting IDE server
[LC] [Log] PureScript Language Server started
[LC] [Info] {"capabilities":{"textDocument":{"colorProvider":null,"completion":{"completionItem":{"snippetSupport":false}},"signatureHelp":{"signatureInformation":{"parameterInformation":{"labelOffsetSupport":true}}}},"workspace":{"applyEdit":true,"didChangeWatchedFiles":{"dynamicRegistration":true}}},"processId":47249,"rootPath":"/Users/sriharshachilakapati/Projects/*****-*******-****","rootUri":"file:///Users/sriharshachilakapati/Projects/*****-*******-****","trace":"off"}
[LC] [Log] Starting with args: ["/Users/sriharshachilakapati/.nvm/versions/node/v11.9.0/bin/node","/usr/local/bin/purescript-language-server","--stdio","--config","{\"purescript.pscIdePort\": null, \"purescript.addNpmPath\": true, \"purescript.autocompleteAddImport\": true, \"purescript.trace.server\": \"verbose\", \"addNpmPath\": true, \"purescript.autoStartPscIde\": true, \"purescript.pursExe\": \"purs\"}"]
[LC] [Log] Starting with cwd: /Users/sriharshachilakapati/Projects/*****-*******-**** and using root path: /Users/sriharshachilakapati/Projects/*****-*******-****
[LC] [Info] Resolved IDE server paths (npm-bin: false) from PATH of /Users/sriharshachilakapati/.nvm/versions/node/v11.9.0/bin:/Users/sriharshachilakapati/.nvm/versions/node/v9.5.0/bin:/Users/sriharshachilakapati/.nvm/versions/node/v11.9.0/bin:/Users/sriharshachilakapati/.nvm/versions/node/v9.5.0/bin:/Users/sriharshachilakapati/.jenv/shims:/Users/sriharshachilakapati/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/sriharshachilakapati/.nvm/versions/node/v9.5.0/bin:/Users/sriharshachilakapati/.jenv/shims:/Users/sriharshachilakapati/bin:/Users/sriharshachilakapati/Library/Android/sdk/build-tools/:/Users/sriharshachilakapati/Library/Android/sdk/platform-tools/:/Users/sriharshachilakapati/Library/Android/sdk/tools/:/Users/sriharshachilakapati/Library/Android/sdk/build-tools/:/Users/sriharshachilakapati/Library/Android/sdk/platform-tools/:/Users/sriharshachilakapati/Library/Android/sdk/tools/ (1stis used):
[LC] [Info] /Users/sriharshachilakapati/.nvm/versions/node/v11.9.0/bin/purs: 0.12.3
[LC] [Info] /Users/sriharshachilakapati/.nvm/versions/node/v9.5.0/bin/purs: 0.11.7
[LC] [Info] /Users/sriharshachilakapati/.nvm/versions/node/v11.9.0/bin/purs: 0.12.3
[LC] [Info] /Users/sriharshachilakapati/.nvm/versions/node/v9.5.0/bin/purs: 0.11.7
[LC] [Info] /Users/sriharshachilakapati/.nvm/versions/node/v9.5.0/bin/purs: 0.11.7
[LC] [Warning] Found multiple IDE server executables; using /Users/sriharshachilakapati/.nvm/versions/node/v11.9.0/bin/purs
[LC] [Info] Found existing port from file: 15345

Any ideas where I'm doing wrong?

from purescript-language-server.

sriharshachilakapati avatar sriharshachilakapati commented on July 21, 2024

@nwolverson Can you please help me out regarding this issue?

I think it's only a configuration issue, but need help in figuring out the correct JSON to pass to language server.

from purescript-language-server.

sriharshachilakapati avatar sriharshachilakapati commented on July 21, 2024

Bump

from purescript-language-server.

sriharshachilakapati avatar sriharshachilakapati commented on July 21, 2024

Finally was able to figure out after going through the atom-ide plugin's code. This is the correct config to be passed.

let config =
    \ { 'autoStartPscIde': v:true
    \ , 'pscIdePort': v:null
    \ , 'autocompleteAddImport': v:true
    \ , 'pursExe': 'purs'
    \ , 'addNpmPath': v:true
    \ }

let configWrapper =
    \ { 'purescript': config
    \ }

Sending configWrapper now to language server solved this issue. However, this information is hard to find. Can you add this to the README?

from purescript-language-server.

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.