diff --git a/autoload/go/debug_test.vim b/autoload/go/debug_test.vim index b177943d67..102c225073 100644 --- a/autoload/go/debug_test.vim +++ b/autoload/go/debug_test.vim @@ -35,13 +35,13 @@ function! Test_GoDebugStart_Errors() abort \] let [l:goversion, l:err] = go#util#Exec(['go', 'env', 'GOVERSION']) let l:goversion = split(l:goversion, "\n")[0] - if l:goversion < 'go1.20' - let expected = [ - \ {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': '# vim-go.test/debug/compilerror'}, - \ {'lnum': 6, 'bufnr': bufnr('%'), 'col': 22, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': ' syntax error: unexpected newline in argument list; possibly missing comma or )'}, - \ {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': 'exit status 2'} - \ ] - endif +" if l:goversion < 'go1.20' +" let expected = [ +" \ {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': '# vim-go.test/debug/compilerror'}, +" \ {'lnum': 6, 'bufnr': bufnr('%'), 'col': 22, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': ' syntax error: unexpected newline in argument list; possibly missing comma or )'}, +" \ {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': 'exit status 2'} +" \ ] +" endif call setqflist([], 'r') call assert_false(exists(':GoDebugStop')) diff --git a/autoload/go/lint_test.vim b/autoload/go/lint_test.vim index 74ce284b74..768ab8da5e 100644 --- a/autoload/go/lint_test.vim +++ b/autoload/go/lint_test.vim @@ -314,8 +314,9 @@ func! s:gometaautosave_multiple(metalinter) abort let l:goversion = split(l:goversion, "\n")[0] if l:goversion < 'go1.20' let expected = [ - \ {'lnum': 4, 'bufnr': bufnr('%'), 'col': 2, 'pattern': '', 'valid': 1, 'vcol': 0, 'nr': -1, 'type': '', 'module': '', 'text': '"time" imported but not used (typecheck)'}, - \ {'lnum': 8, 'bufnr': bufnr('%'), 'col': 7, 'pattern': '', 'valid': 1, 'vcol': 0, 'nr': -1, 'type': '', 'module': '', 'text': 'time.Sleep undefined (type int has no field or method Sleep) (typecheck)'}, + \ {'lnum': 4, 'bufnr': bufnr('%'), 'col': 2, 'pattern': '', 'valid': 1, 'vcol': 0, 'nr': -1, 'type': '', 'module': '', 'text': 'imported and not used: "time"'}, + \ {'lnum': 8, 'bufnr': bufnr('%'), 'col': 24, 'pattern': '', 'valid': 1, 'vcol': 0, 'nr': -1, 'type': '', 'module': '', 'text': 'time.Millisecond undefined (type int has no field or method Millisecond) (typecheck)'}, + \ {'lnum': 8, 'bufnr': bufnr('%'), 'col': 7, 'pattern': '', 'valid': 1, 'vcol': 0, 'nr': -1, 'type': '', 'module': '', 'text': 'time.Sleep undefined (type int has no field or method Sleep)'}, \ ] endif diff --git a/autoload/go/lsp/message.vim b/autoload/go/lsp/message.vim index ff21ebffd0..aae6623a82 100644 --- a/autoload/go/lsp/message.vim +++ b/autoload/go/lsp/message.vim @@ -8,6 +8,9 @@ function! go#lsp#message#Initialize(wd) abort \ 'method': 'initialize', \ 'params': { \ 'processId': getpid(), + \ 'clientInfo': { + \ 'name': 'vim-go', + \ }, \ 'rootUri': go#path#ToURI(a:wd), \ 'capabilities': { \ 'workspace': {