highlights for go
This commit is contained in:
parent
0a3fdd0682
commit
9a2666798a
2 changed files with 25 additions and 1 deletions
|
|
@ -35,7 +35,24 @@ nvim_lsp.rust_analyzer.setup({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
nvim_lsp.gopls.setup({ on_attach = on_attach })
|
nvim_lsp.gopls.setup({
|
||||||
|
on_attach = function (client, bufnr)
|
||||||
|
client.server_capabilities.semanticTokensProvider = {
|
||||||
|
full = true,
|
||||||
|
legend = {
|
||||||
|
--tokenTypes = { 'namespace', 'type', 'class', 'enum', 'interface', 'struct', 'typeParameter', 'parameter', 'variable', 'property', 'enumMember', 'event', 'function', 'method', 'macro', 'keyword', 'modifier', 'comment', 'string', 'number', 'regexp', 'operator', 'decorator', },
|
||||||
|
tokenTypes = { 'namespace' },
|
||||||
|
tokenModifiers = { 'declaration', 'definition', 'readonly', 'static', 'deprecated', 'abstract', 'async', 'modification', 'documentation', 'defaultLibrary',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
settings = {
|
||||||
|
gopls = {
|
||||||
|
semanticTokens = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
nvim_lsp.pyright.setup({ on_attach = on_attach })
|
nvim_lsp.pyright.setup({ on_attach = on_attach })
|
||||||
|
|
||||||
nvim_lsp.clangd.setup({ on_attach = on_attach })
|
nvim_lsp.clangd.setup({ on_attach = on_attach })
|
||||||
|
|
|
||||||
7
.vimrc
7
.vimrc
|
|
@ -1073,6 +1073,13 @@ endfunction
|
||||||
|
|
||||||
map <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
|
map <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
|
||||||
|
|
||||||
|
function! Syn()
|
||||||
|
for id in synstack(line("."), col("."))
|
||||||
|
echo synIDattr(id, "name")
|
||||||
|
endfor
|
||||||
|
endfunction
|
||||||
|
map <F10> command! -nargs=0 Syn call Syn()
|
||||||
|
|
||||||
" Final hi links for TreeSitter
|
" Final hi links for TreeSitter
|
||||||
|
|
||||||
hi link @type.rust TSCSecondaryTypeParam
|
hi link @type.rust TSCSecondaryTypeParam
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue