halfbrained / cuda_lsp

LSP Client plugin for CudaText
6 stars 4 forks source link

Test with VSCode CSS server #95

Closed Alexey-T closed 3 years ago

Alexey-T commented 3 years ago

https://github.com/vscode-langservers/vscode-css-languageserver-bin I ask to test this, it is rather popular server, used in ST3 python package. (Maybe I will do)

if it’s setup is not easy/simple then give the needed info, I will post a wiki topic about this server. it's interesting how 1 server can handle 2-4 lexers for us (css scss sass less). @halfbrained @jairomartineza @miroslavmatas @ildarkhasanshin @d-mal ( https://wiki.lazarus.freepascal.org/CudaText_plugins#LSP_Client )

halfbrained commented 3 years ago

it isn't working at the moment - this server is a bit weird... I'll get right on that :)

halfbrained commented 3 years ago

Установка сервера:

  1. скачать архив репозитория vscode
  2. достать из архива папку /vscode-main/extensions/css-language-features/server и перейти в нее.
  3. заменить содержимое файла 'tsconfig.json' на:

    {
        "compilerOptions": {
            "target": "es2018",
            "lib": [
                "es2018"
            ],
            "module": "commonjs",
            "strict": true,
            "alwaysStrict": true,
            "noImplicitAny": true,
            "noImplicitReturns": true,
            "noImplicitOverride": true,
            "noUnusedLocals": true,
            "noUnusedParameters": true,
            "forceConsistentCasingInFileNames": true,
    
            "outDir": "./out"
        },
      "files": [
          "src/node/cssServerMain.ts"
      ]
    }   
  4. установить зависимости и typescript:
    # в терминале
    npm install
    npm install typescript
  5. скомпилировать:
    # в терминале
    npx tsc

Команда запуска для 'lsp_css.json' будет выглядеть так:

"cmd_unix": [
    "node",
    // заменить на полный путь к папке 'server'
    ".../server/out/node/cssServerMain.js",
    "--stdio"
]
Alexey-T commented 3 years ago

Thanks, posted.