さて寝
このアカウントは、notestockで公開設定になっていません。
調べたら、使いたいCompilationDatabseをbuild直下に適宜コピーするっていう方法が出てきたので、とりあえずはこれで良さげ
./build/release ... ここで作業
./src/main.c ... これを解析する
./compile_commands.json ... これは見つかる
./build/compile_commands.json ... これも見つかる
./build/release/compile_commands.json ... これは見つからない
だから、ひとつのソースツリーから複数のビルドを構築するようなケースで、build以下にサブディレクトリ掘ったりすると、そこが作業ディレクトリであっても見つけてくれない
解析対象ファイルから親ディレクトリを遡って、各ディレクトリの./compile_commands.jsonと./build/compile_commands.jsonを探してるっぽい
JSONはYAMLとしても解釈できるので、json_encode()で辞書を設定ファイルに変換できるっていうのに気付いて、ちょっと面白かった
autocmd User lsp_setup
\ if executable('efm-langserver')
\ | call lsp#register_server({
\ 'name': 'textlint',
\ 'cmd': {server_info->[&shell, &shellcmdflag, 'efm-langserver -c '..fnameescape(s:EfmLangServCfg_textlint())]},
\ 'allowlist': ['markdown', 'asciidoc']
\ })
\ | endif
function! s:EfmLangServCfg_textlint()
let l:temp = tempname()
let l:conf = {
\ 'version': 2,
\ 'languages': {
\ 'markdown': [],
\ 'asciidoc': []
\ }
\ }
let l:tool = {
\ 'lint-command': './node_modules/.bin/textlint -f unix --stdin --stdin-filename ${INPUT}',
\ 'lint-stdin': v:true,
\ 'lint-ignore-exit-code': v:true,
\ 'root-markers': ['.textlintrc'],
\ 'lint-formats': ['%f:%l:%c: %m [%trror/%r]']
\ }
call add(l:conf.languages.markdown, l:tool)
call add(l:conf.languages.asciidoc, l:tool)
call writefile([json_encode(l:conf)], l:temp)
return l:temp
endfunction
slackpkg update gpg && slackpkg update && slackpkg upgrade-all
artemis: a gemini server for pubnixes
https://sr.ht/~sfr/artemis/