Please read the followings in order.
As shown in this figure, you may find Magic Scheme > Scheme-langserver: Log Path
, and please give it an available path, so that you may know what scheme-langserver did wrong.
It’s convenient to add path-to-log-file
and re-write file ~/.local/share/lunarvim/site/pack/packer/start/nvim-lspconfig/lua/lspconfig/server_configurations/scheme_langserver.lua
as follows:
local util = require 'lspconfig.util'
local bin_name = '{path-to-run}'
local cmd = { bin_name ,"path-to-log-file"}
return {
default_config = {
cmd = cmd,
filetypes = { 'scheme' },
root_dir = util.find_git_ancestor,
single_file_support = true,
},
docs = {
description = [[
https://github.com/ufo5260987423/scheme-langserver
`scheme-langserver`, a language server protocol implementation for scheme
]] ,
},
}
No matter who you are, for example an expert or a new schemer, if you want to debug scheme-langserver or issue a bug to the community, you will firstly analyse log.
Ok, you can make an issue here, **AND DON’T FORGET **
If you’re an expert, you may recur the bug with log {path-to-log}
and log-debug.sps
.
{path-to-scheme-langserver}
and you can find out {path-to-scheme-langserver/tests/log-debug.sps}
;{path-to-log}
, usually ~/scheme-langserver.log
, as ~/ready-for-analyse.log
;
If your log is not
~/ready-for-analyse.log
, you should do few modification to{path-to-scheme-langserver/tests/log-debug.sps}
cd {path-to-scheme-langserver}
scheme --script tests/log-debug.sps
or run log-debug.sps
in Scheme REPL. Mostly bugs will cause exceptions on screen.
If you’re an old-fashiond schemer, you may find this page helpful. But personally I use pretty-print
to print useful informations.
OK, you may locate which your behavior cause crash or any other wrong, and reduce the size of code and log. And finally attach them in the issue.