Skip to content

Commit

Permalink
[nvim] add some goodies for cmake filetype
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitmel committed Oct 24, 2023
1 parent 9a8c24f commit 5ce9019
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
15 changes: 15 additions & 0 deletions nvim/dotfiles/vimspector/cmake.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
let s:filetypes = ['cmake']

let g:vimspector_adapters['cmake'] = {
\ 'name': 'cmake',
\ 'command': ['socat', '-', 'UNIX-CONNECT:'.stdpath('run').'/cmake-nvim-debug'],
\ 'configuration': {},
\}

let g:vimspector_configurations['cmake'] = {
\ 'autoselect': v:false,
\ 'adapter': 'cmake',
\ 'configuration': {
\ 'request': 'launch',
\ }
\}
26 changes: 26 additions & 0 deletions nvim/snippets/cmake.snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
snippet if
if($1)
$0
endif()
snippet ifelse
if($1)
$2
else()
$0
endif()
snippet foreach
foreach($1)
$0
endforeach()
snippet while
while($1)
$0
endwhile()
snippet macro
macro($1)
$0
endmacro()
snippet function
function($1)
$0
endfunction()

0 comments on commit 5ce9019

Please sign in to comment.