Add CUDA support

This commit is contained in:
midchildan 2018-05-24 14:34:15 +09:00
parent 8e448920c9
commit 23771b379a
No known key found for this signature in database
GPG Key ID: 84F37D95A7955725
4 changed files with 43 additions and 38 deletions

View File

@ -1051,7 +1051,8 @@ to Clang.
**NOTE**: It is highly recommended to include `-x <language>` flag to libclang. **NOTE**: It is highly recommended to include `-x <language>` flag to libclang.
This is so that the correct language is detected, particularly for header files. This is so that the correct language is detected, particularly for header files.
Common values are `-x c` for C, `-x c++` for C++ and `-x objc` for Objective-C. Common values are `-x c` for C, `-x c++` for C++, `-x objc` for Objective-C, and
`-x cuda` for CUDA.
To give you an impression, if your c++ project is trivial, and your usual To give you an impression, if your c++ project is trivial, and your usual
compilation command is: `g++ -Wall -Wextra -Werror -o FILE.o FILE.cc`, then the compilation command is: `g++ -Wall -Wextra -Werror -o FILE.o FILE.cc`, then the
@ -1627,13 +1628,13 @@ autocommand](#the-ycmquickfixopened-autocommand).
Looks up the current line for a header and jumps to it. Looks up the current line for a header and jumps to it.
Supported in filetypes: `c, cpp, objc, objcpp` Supported in filetypes: `c, cpp, objc, objcpp, cuda`
#### The `GoToDeclaration` subcommand #### The `GoToDeclaration` subcommand
Looks up the symbol under the cursor and jumps to its declaration. Looks up the symbol under the cursor and jumps to its declaration.
Supported in filetypes: `c, cpp, objc, objcpp, cs, go, java, python, rust, Supported in filetypes: `c, cpp, objc, objcpp, cuda, cs, go, java, python, rust,
typescript` typescript`
#### The `GoToDefinition` subcommand #### The `GoToDefinition` subcommand
@ -1645,8 +1646,8 @@ namely when the definition of the symbol is in the current translation unit. A
translation unit consists of the file you are editing and all the files you are translation unit consists of the file you are editing and all the files you are
including with `#include` directives (directly or indirectly) in that file. including with `#include` directives (directly or indirectly) in that file.
Supported in filetypes: `c, cpp, objc, objcpp, cs, go, java, javascript, python, Supported in filetypes: `c, cpp, objc, objcpp, cuda, cs, go, java, javascript,
rust, typescript` python, rust, typescript`
#### The `GoTo` subcommand #### The `GoTo` subcommand
@ -1657,8 +1658,8 @@ the current translation unit, jumps to the symbol's declaration. For
C/C++/Objective-C, it first tries to look up the current line for a header and C/C++/Objective-C, it first tries to look up the current line for a header and
jump to it. For C#, implementations are also considered and preferred. jump to it. For C#, implementations are also considered and preferred.
Supported in filetypes: `c, cpp, objc, objcpp, cs, go, java, javascript, python, Supported in filetypes: `c, cpp, objc, objcpp, cuda, cs, go, java, javascript,
rust, typescript` python, rust, typescript`
#### The `GoToImprecise` subcommand #### The `GoToImprecise` subcommand
@ -1671,7 +1672,7 @@ changes since the last parse that would lead to incorrect jumps. When you're
just browsing around your codebase, this command can spare you quite a bit of just browsing around your codebase, this command can spare you quite a bit of
latency. latency.
Supported in filetypes: `c, cpp, objc, objcpp` Supported in filetypes: `c, cpp, objc, objcpp, cuda`
#### The `GoToReferences` subcommand #### The `GoToReferences` subcommand
@ -1724,7 +1725,8 @@ Invoking this command on `s` returns `std::string => std::basic_string<char>`
**NOTE:** Causes re-parsing of the current translation unit. **NOTE:** Causes re-parsing of the current translation unit.
Supported in filetypes: `c, cpp, objc, objcpp, java, javascript, typescript` Supported in filetypes: `c, cpp, objc, objcpp, cuda, java, javascript,
typescript`
#### The `GetTypeImprecise` subcommand #### The `GetTypeImprecise` subcommand
@ -1737,7 +1739,7 @@ changes since the last parse that would lead to incorrect type. When you're
just browsing around your codebase, this command can spare you quite a bit of just browsing around your codebase, this command can spare you quite a bit of
latency. latency.
Supported in filetypes: `c, cpp, objc, objcpp` Supported in filetypes: `c, cpp, objc, objcpp, cuda`
#### The `GetParent` subcommand #### The `GetParent` subcommand
@ -1768,7 +1770,7 @@ For global declarations, the semantic parent is the translation unit.
**NOTE:** Causes re-parsing of the current translation unit. **NOTE:** Causes re-parsing of the current translation unit.
Supported in filetypes: `c, cpp, objc, objcpp` Supported in filetypes: `c, cpp, objc, objcpp, cuda`
#### The `GetDoc` subcommand #### The `GetDoc` subcommand
@ -1780,8 +1782,8 @@ under the cursor. Depending on the file type, this includes things like:
* Python docstrings, * Python docstrings,
* etc. * etc.
Supported in filetypes: `c, cpp, objc, objcpp, cs, java, javascript, python, Supported in filetypes: `c, cpp, objc, objcpp, cuda, cs, java, javascript,
typescript, rust` python, typescript, rust`
#### The `GetDocImprecise` subcommand #### The `GetDocImprecise` subcommand
@ -1794,7 +1796,7 @@ changes since the last parse that would lead to incorrect docs. When you're
just browsing around your codebase, this command can spare you quite a bit of just browsing around your codebase, this command can spare you quite a bit of
latency. latency.
Supported in filetypes: `c, cpp, objc, objcpp` Supported in filetypes: `c, cpp, objc, objcpp, cuda`
### Refactoring Commands ### Refactoring Commands
@ -1829,7 +1831,7 @@ indication).
**NOTE:** Causes re-parsing of the current translation unit. **NOTE:** Causes re-parsing of the current translation unit.
Supported in filetypes: `c, cpp, objc, objcpp, cs, java, typescript` Supported in filetypes: `c, cpp, objc, objcpp, cuda, cs, java, typescript`
#### The `RefactorRename <new name>` subcommand #### The `RefactorRename <new name>` subcommand
@ -1928,7 +1930,7 @@ the server with the `:YcmRestartServer` command).
This command clears that cache entirely. YCM will then re-query your This command clears that cache entirely. YCM will then re-query your
`FlagsForFile` function or your compilation database as needed in the future. `FlagsForFile` function or your compilation database as needed in the future.
Supported in filetypes: `c, cpp, objc, objcpp` Supported in filetypes: `c, cpp, objc, objcpp, cuda`
#### The `ReloadSolution` subcommand #### The `ReloadSolution` subcommand
@ -2206,8 +2208,8 @@ or off. See the other options below for details.
Note that YCM's diagnostics UI is only supported for C-family languages. Note that YCM's diagnostics UI is only supported for C-family languages.
When set, this option also makes YCM remove all Syntastic checkers set for the When set, this option also makes YCM remove all Syntastic checkers set for the
`c`, `cpp`, `objc` and `objcpp` filetypes since this would conflict with YCM's `c`, `cpp`, `objc`, `objcpp`, and `cuda` filetypes since this would conflict
own diagnostics UI. with YCM's own diagnostics UI.
If you're using YCM's identifier completer in C-family languages but cannot use If you're using YCM's identifier completer in C-family languages but cannot use
the clang-based semantic completer for those languages _and_ want to use the GCC the clang-based semantic completer for those languages _and_ want to use the GCC
@ -2830,7 +2832,7 @@ let g:ycm_semantic_triggers = {
\ 'objc' : ['->', '.', 're!\[[_a-zA-Z]+\w*\s', 're!^\s*[^\W\d]\w*\s', \ 'objc' : ['->', '.', 're!\[[_a-zA-Z]+\w*\s', 're!^\s*[^\W\d]\w*\s',
\ 're!\[.*\]\s'], \ 're!\[.*\]\s'],
\ 'ocaml' : ['.', '#'], \ 'ocaml' : ['.', '#'],
\ 'cpp,objcpp' : ['->', '.', '::'], \ 'cpp,cuda,objcpp' : ['->', '.', '::'],
\ 'perl' : ['->'], \ 'perl' : ['->'],
\ 'php' : ['->', '::'], \ 'php' : ['->', '::'],
\ 'cs,java,javascript,typescript,d,python,perl6,scala,vb,elixir,go' : ['.'], \ 'cs,java,javascript,typescript,d,python,perl6,scala,vb,elixir,go' : ['.'],

View File

@ -369,6 +369,7 @@ function! s:TurnOffSyntasticForCFamily()
let g:syntastic_c_checkers = [] let g:syntastic_c_checkers = []
let g:syntastic_objc_checkers = [] let g:syntastic_objc_checkers = []
let g:syntastic_objcpp_checkers = [] let g:syntastic_objcpp_checkers = []
let g:syntastic_cuda_checkers = []
endfunction endfunction

View File

@ -1291,8 +1291,8 @@ to Clang.
**NOTE**: It is highly recommended to include '-x <language>' flag to libclang. **NOTE**: It is highly recommended to include '-x <language>' flag to libclang.
This is so that the correct language is detected, particularly for header This is so that the correct language is detected, particularly for header
files. Common values are '-x c' for C, '-x c++' for C++ and '-x objc' for files. Common values are '-x c' for C, '-x c++' for C++, '-x objc' for
Objective-C. Objective-C, and '-x cuda' for CUDA.
To give you an impression, if your c++ project is trivial, and your usual To give you an impression, if your c++ project is trivial, and your usual
compilation command is: 'g++ -Wall -Wextra -Werror -o FILE.o FILE.cc', then the compilation command is: 'g++ -Wall -Wextra -Werror -o FILE.o FILE.cc', then the
@ -1893,14 +1893,14 @@ The *GoToInclude* subcommand
Looks up the current line for a header and jumps to it. Looks up the current line for a header and jumps to it.
Supported in filetypes: 'c, cpp, objc, objcpp' Supported in filetypes: 'c, cpp, objc, objcpp, cuda'
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
The *GoToDeclaration* subcommand The *GoToDeclaration* subcommand
Looks up the symbol under the cursor and jumps to its declaration. Looks up the symbol under the cursor and jumps to its declaration.
Supported in filetypes: 'c, cpp, objc, objcpp, cs, go, java, python, rust, Supported in filetypes: 'c, cpp, objc, objcpp, cuda, cs, go, java, python, rust,
typescript' typescript'
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
@ -1913,7 +1913,7 @@ namely when the definition of the symbol is in the current translation unit. A
translation unit consists of the file you are editing and all the files you are translation unit consists of the file you are editing and all the files you are
including with '#include' directives (directly or indirectly) in that file. including with '#include' directives (directly or indirectly) in that file.
Supported in filetypes: 'c, cpp, objc, objcpp, cs, go, java, javascript, Supported in filetypes: 'c, cpp, objc, objcpp, cuda, cs, go, java, javascript,
python, rust, typescript' python, rust, typescript'
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
@ -1926,7 +1926,7 @@ the current translation unit, jumps to the symbol's declaration. For
C/C++/Objective-C, it first tries to look up the current line for a header and C/C++/Objective-C, it first tries to look up the current line for a header and
jump to it. For C#, implementations are also considered and preferred. jump to it. For C#, implementations are also considered and preferred.
Supported in filetypes: 'c, cpp, objc, objcpp, cs, go, java, javascript, Supported in filetypes: 'c, cpp, objc, objcpp, cuda, cs, go, java, javascript,
python, rust, typescript' python, rust, typescript'
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
@ -1941,7 +1941,7 @@ made any changes since the last parse that would lead to incorrect jumps. When
you're just browsing around your codebase, this command can spare you quite a you're just browsing around your codebase, this command can spare you quite a
bit of latency. bit of latency.
Supported in filetypes: 'c, cpp, objc, objcpp' Supported in filetypes: 'c, cpp, objc, objcpp, cuda'
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
The *GoToReferences* subcommand The *GoToReferences* subcommand
@ -1999,7 +1999,8 @@ Invoking this command on 's' returns 'std::string => std::basic_string<char>'
**NOTE:** Causes re-parsing of the current translation unit. **NOTE:** Causes re-parsing of the current translation unit.
Supported in filetypes: 'c, cpp, objc, objcpp, java, javascript, typescript' Supported in filetypes: 'c, cpp, objc, objcpp, cuda, java, javascript,
typescript'
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
The *GetTypeImprecise* subcommand The *GetTypeImprecise* subcommand
@ -2013,7 +2014,7 @@ made any changes since the last parse that would lead to incorrect type. When
you're just browsing around your codebase, this command can spare you quite a you're just browsing around your codebase, this command can spare you quite a
bit of latency. bit of latency.
Supported in filetypes: 'c, cpp, objc, objcpp' Supported in filetypes: 'c, cpp, objc, objcpp, cuda'
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
The *GetParent* subcommand The *GetParent* subcommand
@ -2043,7 +2044,7 @@ For global declarations, the semantic parent is the translation unit.
**NOTE:** Causes re-parsing of the current translation unit. **NOTE:** Causes re-parsing of the current translation unit.
Supported in filetypes: 'c, cpp, objc, objcpp' Supported in filetypes: 'c, cpp, objc, objcpp, cuda'
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
The *GetDoc* subcommand The *GetDoc* subcommand
@ -2056,8 +2057,8 @@ under the cursor. Depending on the file type, this includes things like:
- Python docstrings, - Python docstrings,
- etc. - etc.
Supported in filetypes: 'c, cpp, objc, objcpp, cs, java, javascript, python, Supported in filetypes: 'c, cpp, objc, objcpp, cuda, cs, java, javascript,
typescript, rust' python, typescript, rust'
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
The *GetDocImprecise* subcommand The *GetDocImprecise* subcommand
@ -2071,7 +2072,7 @@ made any changes since the last parse that would lead to incorrect docs. When
you're just browsing around your codebase, this command can spare you quite a you're just browsing around your codebase, this command can spare you quite a
bit of latency. bit of latency.
Supported in filetypes: 'c, cpp, objc, objcpp' Supported in filetypes: 'c, cpp, objc, objcpp, cuda'
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
*youcompleteme-refactoring-commands* *youcompleteme-refactoring-commands*
@ -2109,7 +2110,7 @@ indication).
**NOTE:** Causes re-parsing of the current translation unit. **NOTE:** Causes re-parsing of the current translation unit.
Supported in filetypes: 'c, cpp, objc, objcpp, cs, java, typescript' Supported in filetypes: 'c, cpp, objc, objcpp, cuda, cs, java, typescript'
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
*RefactorRename-new-name* *RefactorRename-new-name*
@ -2216,7 +2217,7 @@ the server with the |:YcmRestartServer| command).
This command clears that cache entirely. YCM will then re-query your This command clears that cache entirely. YCM will then re-query your
'FlagsForFile' function or your compilation database as needed in the future. 'FlagsForFile' function or your compilation database as needed in the future.
Supported in filetypes: 'c, cpp, objc, objcpp' Supported in filetypes: 'c, cpp, objc, objcpp, cuda'
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
The *ReloadSolution* subcommand The *ReloadSolution* subcommand
@ -2488,8 +2489,8 @@ on or off. See the other options below for details.
Note that YCM's diagnostics UI is only supported for C-family languages. Note that YCM's diagnostics UI is only supported for C-family languages.
When set, this option also makes YCM remove all Syntastic checkers set for the When set, this option also makes YCM remove all Syntastic checkers set for the
'c', 'cpp', 'objc' and 'objcpp' filetypes since this would conflict with YCM's 'c', 'cpp', 'objc', 'objcpp', and 'cuda' filetypes since this would conflict
own diagnostics UI. with YCM's own diagnostics UI.
If you're using YCM's identifier completer in C-family languages but cannot use If you're using YCM's identifier completer in C-family languages but cannot use
the clang-based semantic completer for those languages _and_ want to use the the clang-based semantic completer for those languages _and_ want to use the
@ -3070,7 +3071,7 @@ Default: '[see next line]'
\ 'objc' : ['->', '.', 're!\[[_a-zA-Z]+\w*\s', 're!^\s*[^\W\d]\w*\s', \ 'objc' : ['->', '.', 're!\[[_a-zA-Z]+\w*\s', 're!^\s*[^\W\d]\w*\s',
\ 're!\[.*\]\s'], \ 're!\[.*\]\s'],
\ 'ocaml' : ['.', '#'], \ 'ocaml' : ['.', '#'],
\ 'cpp,objcpp' : ['->', '.', '::'], \ 'cpp,cuda,objcpp' : ['->', '.', '::'],
\ 'perl' : ['->'], \ 'perl' : ['->'],
\ 'php' : ['->', '::'], \ 'php' : ['->', '::'],
\ 'cs,java,javascript,typescript,d,python,perl6,scala,vb,elixir,go' : ['.'], \ 'cs,java,javascript,typescript,d,python,perl6,scala,vb,elixir,go' : ['.'],

View File

@ -27,7 +27,8 @@ from ycm.client.event_notification import EventNotification
from ycm.diagnostic_interface import DiagnosticInterface from ycm.diagnostic_interface import DiagnosticInterface
DIAGNOSTIC_UI_FILETYPES = { 'cpp', 'cs', 'c', 'objc', 'objcpp', 'typescript' } DIAGNOSTIC_UI_FILETYPES = { 'cpp', 'cs', 'c', 'objc', 'objcpp', 'cuda',
'typescript' }
DIAGNOSTIC_UI_ASYNC_FILETYPES = { 'java' } DIAGNOSTIC_UI_ASYNC_FILETYPES = { 'java' }