Closed cxwx closed 12 months ago
see https://github.com/MaskRay/ccls/blob/master/src/config.hh#L289
limit cpu core for ccls
Thanks!
It works.
Is there any method to config it without compiling by oneself?
So that I could use the homebrew
version of ccls.
if you are using vscode, try "ccls.index.threads": <number>,
or you can add json into ccls launch arg --init, see https://github.com/MaskRay/ccls/blob/master/src/main.cc#L48
if I use ale, they only support
call ale#Set('cpp_ccls_executable', 'ccls')
call ale#Set('cpp_ccls_init_options', {})
call ale#Set('c_build_dir', '')
call ale#linter#Define('cpp', {
\ 'name': 'ccls',
\ 'lsp': 'stdio',
\ 'executable': {b -> ale#Var(b, 'cpp_ccls_executable')},
\ 'command': '%e',
\ 'project_root': function('ale#handlers#ccls#GetProjectRoot'),
\ 'initialization_options': {b -> ale#handlers#ccls#GetInitOpts(b, 'cpp_ccls_init_options')},
\})
Is there any way to set "ccls.index.threads"
?
I don't find the correct way
if you are using vscode, try
"ccls.index.threads": <number>,
or you can add json into ccls launch arg --init, see https://github.com/MaskRay/ccls/blob/master/src/main.cc#L48
what I need is a global way to set it
I've try to set in cpp_ccls_init_options
but it didn't work.
not "ccls.index.threads": <number>,
but cpp_ccls_init_options={'index':{'threads':1}}
Could I set the limit of the cpus in
.ccls
config file?