iamcco / diagnostic-languageserver

diagnostic language server integrate with linters
MIT License
412 stars 28 forks source link

How can I debug my config? #60

Open sazary opened 3 years ago

sazary commented 3 years ago

Hi
I'm trying to use dmypy (mypy in daemon mode) as a linter, but it's not working.
I'm can use mypy using the config in the wiki, and I can use dmypy in cli.
My question is how can I see what command is the diagnostic lsp actually running and what response is it receiving and what is going wrong? No error or message is being printed in coc's log file AFAIK.

This is the relevant part of coc-settings:

  "diagnostic-languageserver.debug": true,
  "diagnostic-languageserver.trace.server": "verbose",
  "diagnostic-languageserver.filetypes": {
    "python": ["flake8", "dmypy"]
  },
  "diagnostic-languageserver.linters": {
    "dmypy": {
       ...

And this is my versions:

## versions

vim version: NVIM v0.5.0-dev+1422-ga03ffe160
node version: v16.3.0
coc.nvim version: 0.0.80-171ff2bc99
coc.nvim directory: /home/sazary/.vim/plugged/coc.nvim
term: xterm-256color
platform: linux

Thank you very much

iamcco commented 3 years ago
  1. setting "diagnostic-languageserver.trace.server": "verbose" in coc-settings.json
  2. open file
  3. run :CocCommand workspace.showOutput and select option diagnostic-languageserver

you will see something like

image

thesofakillers commented 2 years ago

@sazary did you figure out a working diagnostic-ls config for dmypy? Care to share?

JoaquimEsteves commented 3 months ago

For future reference - you can get the logs through neovim's default lspconfig like so:

vim.lsp.set_log_level("TRACE")
-- Later you can invoke :LspLog