mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 04:00:03 +08:00
feat(layer): add lang#cmake
layer
This commit is contained in:
parent
14d9225346
commit
4dbbad92f0
58
autoload/SpaceVim/layers/lang/cmake.vim
Normal file
58
autoload/SpaceVim/layers/lang/cmake.vim
Normal file
@ -0,0 +1,58 @@
|
||||
"=============================================================================
|
||||
" cmake.vim --- SpaceVim cmake layer
|
||||
" Copyright (c) 2016-2022 Wang Shidong & Contributors
|
||||
" Author: Wang Shidong < wsdjeg@outlook.com >
|
||||
" URL: https://spacevim.org
|
||||
" License: GPLv3
|
||||
"=============================================================================
|
||||
|
||||
""
|
||||
" @section lang#cmake, layers-lang-cmake
|
||||
" @parentsection layers
|
||||
" This layer is for cmake development, disabled by default, to enable this
|
||||
" layer, add following snippet to your SpaceVim configuration file.
|
||||
" >
|
||||
" [[layers]]
|
||||
" name = 'lang#cmake'
|
||||
" <
|
||||
"
|
||||
|
||||
function! SpaceVim#layers#lang#cmake#plugins() abort
|
||||
let plugins = []
|
||||
call add(plugins, [g:_spacevim_root_dir . 'bundle/vim-cmake-syntax', { 'merged' : 0}])
|
||||
return plugins
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#layers#lang#cmake#config() abort
|
||||
call SpaceVim#mapping#space#regesit_lang_mappings('cmake',
|
||||
\ function('s:on_ft'))
|
||||
if SpaceVim#layers#lsp#check_filetype('cmake')
|
||||
\ || SpaceVim#layers#lsp#check_server('cmake')
|
||||
call SpaceVim#mapping#gd#add('cmake',
|
||||
\ function('SpaceVim#lsp#go_to_def'))
|
||||
call SpaceVim#mapping#g_capital_d#add('cmake',
|
||||
\ function('SpaceVim#lsp#go_to_declaration'))
|
||||
endif
|
||||
endfunction
|
||||
function! s:on_ft() abort
|
||||
if SpaceVim#layers#lsp#check_filetype('cmake')
|
||||
\ || SpaceVim#layers#lsp#check_server('cmake')
|
||||
nnoremap <silent><buffer> K :call SpaceVim#lsp#show_doc()<CR>
|
||||
|
||||
call SpaceVim#mapping#space#langSPC('nnoremap', ['l', 'd'],
|
||||
\ 'call SpaceVim#lsp#show_doc()', 'show-document', 1)
|
||||
call SpaceVim#mapping#space#langSPC('nnoremap', ['l', 'x'],
|
||||
\ 'call SpaceVim#lsp#references()', 'show-references', 1)
|
||||
call SpaceVim#mapping#space#langSPC('nnoremap', ['l', 'e'],
|
||||
\ 'call SpaceVim#lsp#rename()', 'rename-symbol', 1)
|
||||
call SpaceVim#mapping#space#langSPC('nnoremap', ['l', 'h'],
|
||||
\ 'call SpaceVim#lsp#show_line_diagnostics()', 'show-line-diagnostics', 1)
|
||||
let g:_spacevim_mappings_space.l.w = {'name' : '+Workspace'}
|
||||
call SpaceVim#mapping#space#langSPC('nnoremap', ['l', 'w', 'l'],
|
||||
\ 'call SpaceVim#lsp#list_workspace_folder()', 'list-workspace-folder', 1)
|
||||
call SpaceVim#mapping#space#langSPC('nnoremap', ['l', 'w', 'a'],
|
||||
\ 'call SpaceVim#lsp#add_workspace_folder()', 'add-workspace-folder', 1)
|
||||
call SpaceVim#mapping#space#langSPC('nnoremap', ['l', 'w', 'r'],
|
||||
\ 'call SpaceVim#lsp#remove_workspace_folder()', 'remove-workspace-folder', 1)
|
||||
endif
|
||||
endfunction
|
@ -31,3 +31,4 @@ In `bundle/` directory, there are two kinds of plugins: forked plugins without c
|
||||
- [telescope-ctags-outline.nvim](https://github.com/fcying/telescope-ctags-outline.nvim)
|
||||
- [vim-assembly@2b1994a](https://github.com/wsdjeg/vim-assembly/tree/2b1994a5d23c90651754b4c75750100f63074d8b)
|
||||
- [vim-autohotkey@6bf1e71](https://github.com/wsdjeg/vim-autohotkey/tree/6bf1e718c73cad22caad3ecd8c4db96db05b37f7)
|
||||
- [vim-cmake-syntax@bcc3a97a](https://github.com/pboettch/vim-cmake-syntax/tree/bcc3a97ab934f03e112becd4ce79286793152b47)
|
||||
|
32
bundle/vim-cmake-syntax/LICENSE
Normal file
32
bundle/vim-cmake-syntax/LICENSE
Normal file
@ -0,0 +1,32 @@
|
||||
CMake - Cross Platform Makefile Generator
|
||||
Copyright 2000-2014 Kitware, Inc.
|
||||
Copyright 2000-2011 Insight Software Consortium
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the names of Kitware, Inc., the Insight Software Consortium,
|
||||
nor the names of their contributors may be used to endorse or promote
|
||||
products derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
32
bundle/vim-cmake-syntax/README.md
Normal file
32
bundle/vim-cmake-syntax/README.md
Normal file
@ -0,0 +1,32 @@
|
||||
# vim-cmake-syntax
|
||||
|
||||
Vim syntax highlighting rules for modern CMakeLists.txt.
|
||||
|
||||
Original code from KitWare.
|
||||
First hosted on Github by Nicholas Hutchinson.
|
||||
Extended and modified by Patrick Boettcher and contributors
|
||||
|
||||
Keyword update - refer to syntax/cmake.vim-header.
|
||||
|
||||
The code of this repository is integrated in and released with CMake and is pulled
|
||||
into the official cmake-distribution "from time to time".
|
||||
|
||||
## Installation
|
||||
|
||||
With Pathogen
|
||||
|
||||
cd ~/.vim/bundle
|
||||
git clone git://github.com/pboettch/vim-cmake-syntax.git
|
||||
|
||||
With Vundle
|
||||
|
||||
" inside .vimrc
|
||||
Plugin 'pboettch/vim-cmake-syntax'
|
||||
|
||||
## Test
|
||||
|
||||
There is a ever growing test-suite based on ctest located in test/
|
||||
|
||||
cd <build-dir-where-ever-located>
|
||||
cmake path/to/this/repo/test
|
||||
ctest
|
130
bundle/vim-cmake-syntax/cmake.vim.in
Normal file
130
bundle/vim-cmake-syntax/cmake.vim.in
Normal file
@ -0,0 +1,130 @@
|
||||
" Vim syntax file
|
||||
" Program: CMake - Cross-Platform Makefile Generator
|
||||
" Version: @VERSION@
|
||||
" Language: CMake
|
||||
" Author: Andy Cedilnik <andy.cedilnik@kitware.com>,
|
||||
" Nicholas Hutchinson <nshutchinson@gmail.com>,
|
||||
" Patrick Boettcher <patrick.boettcher@posteo.de>
|
||||
" Maintainer: Dimitri Merejkowsky <d.merej@gmail.com>
|
||||
" Former Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com>
|
||||
" Last Change: @DATE@
|
||||
"
|
||||
" Licence: The CMake license applies to this file. See
|
||||
" https://cmake.org/licensing
|
||||
" This implies that distribution with Vim is allowed
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
syn region cmakeBracketArgument start="\[\z(=\?\|=[0-9]*\)\[" end="\]\z1\]" contains=cmakeTodo,@Spell
|
||||
|
||||
syn region cmakeComment start="#" end="$" contains=cmakeTodo,@Spell
|
||||
syn region cmakeBracketComment start="#\[\z(=\?\|=[0-9]*\)\[" end="\]\z1\]" contains=cmakeTodo,@Spell
|
||||
|
||||
syn match cmakeEscaped /\(\\\\\|\\"\|\\n\|\\t\)/ contained
|
||||
syn region cmakeRegistry start="\[" end="]" contained oneline contains=cmakeTodo,cmakeEscaped
|
||||
|
||||
syn region cmakeGeneratorExpression start="$<" end=">" contained oneline contains=cmakeVariableValue,cmakeProperty,cmakeGeneratorExpressions,cmakeTodo
|
||||
|
||||
syn region cmakeString start='"' end='"' contained contains=cmakeTodo,cmakeVariableValue,cmakeEscaped
|
||||
|
||||
syn region cmakeVariableValue start="${" end="}" contained oneline contains=cmakeVariable,cmakeTodo,cmakeVariableValue
|
||||
|
||||
syn region cmakeEnvironment start="$ENV{" end="}" contained oneline contains=cmakeTodo
|
||||
|
||||
syn region cmakeArguments start="(" end=")" contains=ALLBUT,cmakeGeneratorExpressions,cmakeCommand,cmakeCommandConditional,cmakeCommandRepeat,cmakeCommandDeprecated,cmakeCommandManuallyAdded,cmakeArguments,cmakeTodo
|
||||
|
||||
syn case match
|
||||
|
||||
syn keyword cmakeProperty contained
|
||||
@PROPERTIES@
|
||||
|
||||
syn keyword cmakeVariable contained
|
||||
@VARIABLE_LIST@
|
||||
|
||||
syn keyword cmakeModule contained
|
||||
@MODULES@
|
||||
|
||||
@KEYWORDS@
|
||||
|
||||
syn keyword cmakeGeneratorExpressions contained
|
||||
@GENERATOR_EXPRESSIONS@
|
||||
|
||||
syn case ignore
|
||||
|
||||
syn keyword cmakeCommand
|
||||
@COMMAND_LIST@
|
||||
\ nextgroup=cmakeArguments
|
||||
|
||||
syn keyword cmakeCommandConditional
|
||||
@CONDITIONALS@
|
||||
\ nextgroup=cmakeArguments
|
||||
|
||||
syn keyword cmakeCommandRepeat
|
||||
@LOOPS@
|
||||
\ nextgroup=cmakeArguments
|
||||
|
||||
syn keyword cmakeCommandDeprecated
|
||||
@DEPRECATED@
|
||||
\ nextgroup=cmakeArguments
|
||||
|
||||
syn case match
|
||||
|
||||
syn keyword cmakeTodo
|
||||
\ TODO FIXME XXX
|
||||
\ contained
|
||||
|
||||
hi def link cmakeBracketArgument String
|
||||
hi def link cmakeBracketComment Comment
|
||||
hi def link cmakeCommand Function
|
||||
hi def link cmakeCommandConditional Conditional
|
||||
hi def link cmakeCommandDeprecated WarningMsg
|
||||
hi def link cmakeCommandRepeat Repeat
|
||||
hi def link cmakeComment Comment
|
||||
hi def link cmakeEnvironment Special
|
||||
hi def link cmakeEscaped Special
|
||||
hi def link cmakeGeneratorExpression WarningMsg
|
||||
hi def link cmakeGeneratorExpressions Constant
|
||||
hi def link cmakeModule Include
|
||||
hi def link cmakeProperty Constant
|
||||
hi def link cmakeRegistry Underlined
|
||||
hi def link cmakeString String
|
||||
hi def link cmakeTodo TODO
|
||||
hi def link cmakeVariableValue Type
|
||||
hi def link cmakeVariable Identifier
|
||||
|
||||
@KEYWORDS_HIGHLIGHT@
|
||||
|
||||
" Manually added - difficult to parse out of documentation
|
||||
syn case ignore
|
||||
|
||||
syn keyword cmakeCommandManuallyAdded
|
||||
\ configure_package_config_file write_basic_package_version_file
|
||||
\ nextgroup=cmakeArguments
|
||||
|
||||
syn case match
|
||||
|
||||
syn keyword cmakeKWconfigure_package_config_file contained
|
||||
\ INSTALL_DESTINATION PATH_VARS NO_SET_AND_CHECK_MACRO NO_CHECK_REQUIRED_COMPONENTS_MACRO INSTALL_PREFIX
|
||||
|
||||
syn keyword cmakeKWconfigure_package_config_file_constants contained
|
||||
\ AnyNewerVersion SameMajorVersion SameMinorVersion ExactVersion
|
||||
|
||||
syn keyword cmakeKWwrite_basic_package_version_file contained
|
||||
\ VERSION COMPATIBILITY
|
||||
|
||||
hi def link cmakeCommandManuallyAdded Function
|
||||
|
||||
hi def link cmakeKWconfigure_package_config_file ModeMsg
|
||||
hi def link cmakeKWwrite_basic_package_version_file ModeMsg
|
||||
hi def link cmakeKWconfigure_package_config_file_constants Constant
|
||||
|
||||
let b:current_syntax = "cmake"
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" vim: set nowrap:
|
213
bundle/vim-cmake-syntax/extract-upper-case.pl
Normal file
213
bundle/vim-cmake-syntax/extract-upper-case.pl
Normal file
@ -0,0 +1,213 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use POSIX qw(strftime);
|
||||
use JSON;
|
||||
use File::Basename;
|
||||
|
||||
#my $cmake = "/home/pboettch/devel/upstream/cmake/build/bin/cmake";
|
||||
my $cmake = "cmake";
|
||||
|
||||
my @variables;
|
||||
my @commands;
|
||||
my @properties;
|
||||
my @modules;
|
||||
my %keywords; # command => keyword-list
|
||||
|
||||
# find cmake/Modules/ | sed -rn 's/.*CMakeDetermine(.+)Compiler.cmake/\1/p' | sort
|
||||
my @languages = qw(ASM ASM_MASM ASM_NASM C CSharp CUDA CXX Fortran Java RC Swift);
|
||||
|
||||
# unwanted upper-cases
|
||||
my %unwanted = map { $_ => 1 } qw(VS CXX IDE NOTFOUND NO_ DFOO DBAR NEW);
|
||||
# cannot remove ALL - exists for add_custom_command
|
||||
|
||||
# control-statements
|
||||
my %conditional = map { $_ => 1 } qw(if else elseif endif);
|
||||
my %loop = map { $_ => 1 } qw(foreach while endforeach endwhile);
|
||||
|
||||
# decrecated
|
||||
my %deprecated = map { $_ => 1 } qw(build_name exec_program export_library_dependencies install_files install_programs install_targets link_libraries make_directory output_required_files remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file);
|
||||
|
||||
# add some (popular) modules
|
||||
push @modules, "ExternalProject";
|
||||
|
||||
# variables
|
||||
open(CMAKE, "$cmake --help-variable-list|") or die "could not run cmake";
|
||||
while (<CMAKE>) {
|
||||
chomp;
|
||||
|
||||
if (/<(.*?)>/) {
|
||||
if ($1 eq 'LANG') {
|
||||
foreach my $lang (@languages) {
|
||||
(my $V = $_) =~ s/<.*>/$lang/;
|
||||
push @variables, $V;
|
||||
}
|
||||
|
||||
next
|
||||
} else {
|
||||
next; # skip if containing < or >
|
||||
}
|
||||
}
|
||||
|
||||
push @variables, $_;
|
||||
}
|
||||
close(CMAKE);
|
||||
|
||||
# transform all variables in a hash - to be able to use exists later on
|
||||
my %variables = map { $_ => 1 } @variables;
|
||||
|
||||
# commands
|
||||
open(CMAKE, "$cmake --help-command-list|");
|
||||
while (my $cmd = <CMAKE>) {
|
||||
chomp $cmd;
|
||||
push @commands, $cmd;
|
||||
}
|
||||
close(CMAKE);
|
||||
|
||||
# now generate a keyword-list per command
|
||||
foreach my $cmd (@commands) {
|
||||
my @word = extract_upper("$cmake --help-command $cmd|");
|
||||
|
||||
next if scalar @word == 0;
|
||||
|
||||
$keywords{$cmd} = [ sort keys %{ { map { $_ => 1 } @word } } ];
|
||||
}
|
||||
|
||||
# and now for modules
|
||||
foreach my $mod (@modules) {
|
||||
my @word = extract_upper("$cmake --help-module $mod|");
|
||||
|
||||
next if scalar @word == 0;
|
||||
|
||||
$keywords{$mod} = [ sort keys %{ { map { $_ => 1 } @word } } ];
|
||||
}
|
||||
|
||||
# and now for generator-expressions
|
||||
my @generator_expr = extract_upper("$cmake --help-manual cmake-generator-expressions |");
|
||||
|
||||
# properties
|
||||
open(CMAKE, "$cmake --help-property-list|");
|
||||
while (<CMAKE>) {
|
||||
next if /\</; # skip if containing < or >
|
||||
chomp;
|
||||
push @properties, $_;
|
||||
}
|
||||
close(CMAKE);
|
||||
|
||||
# transform all properties in a hash
|
||||
my %properties = map { $_ => 1 } @properties;
|
||||
|
||||
# read in manually written files
|
||||
my $modules_dir = dirname(__FILE__) . "/modules";
|
||||
opendir(DIR, $modules_dir) || die "can't opendir $modules_dir: $!";
|
||||
my @json_files = grep { /\.json$/ && -f "$modules_dir/$_" } readdir(DIR);
|
||||
closedir DIR;
|
||||
|
||||
foreach my $file (@json_files) {
|
||||
local $/; # Enable 'slurp' mode
|
||||
open my $fh, "<", $modules_dir."/".$file;
|
||||
my $json = <$fh>;
|
||||
close $fh;
|
||||
|
||||
my $mod = decode_json($json);
|
||||
foreach my $var (@{$mod->{variables}}) {
|
||||
$variables{$var} = 1;
|
||||
}
|
||||
|
||||
while (my ($cmd, $keywords) = each %{$mod->{commands}}) {
|
||||
$keywords{$cmd} = [ sort @{$keywords} ];
|
||||
}
|
||||
}
|
||||
|
||||
# version
|
||||
open(CMAKE, "$cmake --version|");
|
||||
my $version = 'unknown';
|
||||
while (<CMAKE>) {
|
||||
chomp;
|
||||
$version = $_ if /cmake version/;
|
||||
}
|
||||
close(CMAKE);
|
||||
|
||||
# generate cmake.vim
|
||||
open(IN, "<cmake.vim.in") or die "could not read cmake.vim.in";
|
||||
open(OUT, ">syntax/cmake.vim") or die "could not write to syntax/cmake.vim";
|
||||
|
||||
my @keyword_hi;
|
||||
|
||||
while(<IN>)
|
||||
{
|
||||
if (m/\@([A-Z0-9_]+)\@/) { # match for @SOMETHING@
|
||||
if ($1 eq "COMMAND_LIST") {
|
||||
# do not include "special" commands in this list
|
||||
my @tmp = grep { ! exists $conditional{$_} and
|
||||
! exists $loop{$_} and
|
||||
! exists $deprecated{$_} } @commands;
|
||||
print_list(\*OUT, @tmp);
|
||||
} elsif ($1 eq "VARIABLE_LIST") {
|
||||
print_list(\*OUT, keys %variables);
|
||||
} elsif ($1 eq "MODULES") {
|
||||
print_list(\*OUT, @modules);
|
||||
} elsif ($1 eq "GENERATOR_EXPRESSIONS") {
|
||||
print_list(\*OUT, @generator_expr);
|
||||
} elsif ($1 eq "CONDITIONALS") {
|
||||
print_list(\*OUT, keys %conditional);
|
||||
} elsif ($1 eq "LOOPS") {
|
||||
print_list(\*OUT, keys %loop);
|
||||
} elsif ($1 eq "DEPRECATED") {
|
||||
print_list(\*OUT, keys %deprecated);
|
||||
} elsif ($1 eq "PROPERTIES") {
|
||||
print_list(\*OUT, keys %properties);
|
||||
} elsif ($1 eq "KEYWORDS") {
|
||||
foreach my $k (sort keys %keywords) {
|
||||
print OUT "syn keyword cmakeKW$k contained\n";
|
||||
print_list(\*OUT, @{$keywords{$k}});
|
||||
print OUT "\n";
|
||||
push @keyword_hi, "hi def link cmakeKW$k ModeMsg";
|
||||
}
|
||||
} elsif ($1 eq "KEYWORDS_HIGHLIGHT") {
|
||||
print OUT join("\n", @keyword_hi), "\n";
|
||||
} elsif ($1 eq "VERSION") {
|
||||
$_ =~ s/\@VERSION\@/$version/;
|
||||
print OUT $_;
|
||||
} elsif ($1 eq "DATE") {
|
||||
my $date = strftime "%Y %b %d", localtime;
|
||||
$_ =~ s/\@DATE\@/$date/;
|
||||
print OUT $_;
|
||||
} else {
|
||||
print "ERROR do not know how to replace $1\n";
|
||||
}
|
||||
} else {
|
||||
print OUT $_;
|
||||
}
|
||||
}
|
||||
close(IN);
|
||||
close(OUT);
|
||||
|
||||
sub extract_upper
|
||||
{
|
||||
my $input = shift;
|
||||
my @word;
|
||||
|
||||
open(KW, $input);
|
||||
while (<KW>) {
|
||||
foreach my $w (m/\b([A-Z_]{2,})\b/g) {
|
||||
next
|
||||
if exists $variables{$w} or # skip if it is a variable
|
||||
exists $unwanted{$w} or # skip if not wanted
|
||||
grep(/$w/, @word); # skip if already in array
|
||||
|
||||
push @word, $w;
|
||||
}
|
||||
}
|
||||
close(KW);
|
||||
|
||||
return @word;
|
||||
}
|
||||
|
||||
sub print_list
|
||||
{
|
||||
my $O = shift;
|
||||
my $indent = " " x 12 . "\\ ";
|
||||
print $O $indent, join("\n" . $indent, sort @_), "\n";
|
||||
}
|
89
bundle/vim-cmake-syntax/indent/cmake.vim
Normal file
89
bundle/vim-cmake-syntax/indent/cmake.vim
Normal file
@ -0,0 +1,89 @@
|
||||
" Vim indent file
|
||||
" Language: CMake (ft=cmake)
|
||||
" Author: Andy Cedilnik <andy.cedilnik@kitware.com>
|
||||
" Maintainer: Dimitri Merejkowsky <d.merej@gmail.com>
|
||||
" Former Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com>
|
||||
" Last Change: 2017 Aug 30
|
||||
"
|
||||
" Licence: The CMake license applies to this file. See
|
||||
" https://cmake.org/licensing
|
||||
" This implies that distribution with Vim is allowed
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal indentexpr=CMakeGetIndent(v:lnum)
|
||||
setlocal indentkeys+==ENDIF(,ENDFOREACH(,ENDMACRO(,ELSE(,ELSEIF(,ENDWHILE(
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*CMakeGetIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
fun! CMakeGetIndent(lnum)
|
||||
let this_line = getline(a:lnum)
|
||||
|
||||
" Find a non-blank line above the current line.
|
||||
let lnum = a:lnum
|
||||
let lnum = prevnonblank(lnum - 1)
|
||||
let previous_line = getline(lnum)
|
||||
|
||||
" Hit the start of the file, use zero indent.
|
||||
if lnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let ind = indent(lnum)
|
||||
|
||||
let or = '\|'
|
||||
" Regular expressions used by line indentation function.
|
||||
let cmake_regex_comment = '#.*'
|
||||
let cmake_regex_identifier = '[A-Za-z][A-Za-z0-9_]*'
|
||||
let cmake_regex_quoted = '"\([^"\\]\|\\.\)*"'
|
||||
let cmake_regex_arguments = '\(' . cmake_regex_quoted .
|
||||
\ or . '\$(' . cmake_regex_identifier . ')' .
|
||||
\ or . '[^()\\#"]' . or . '\\.' . '\)*'
|
||||
|
||||
let cmake_indent_comment_line = '^\s*' . cmake_regex_comment
|
||||
let cmake_indent_blank_regex = '^\s*$'
|
||||
let cmake_indent_open_regex = '^\s*' . cmake_regex_identifier .
|
||||
\ '\s*(' . cmake_regex_arguments .
|
||||
\ '\(' . cmake_regex_comment . '\)\?$'
|
||||
|
||||
let cmake_indent_close_regex = '^' . cmake_regex_arguments .
|
||||
\ ')\s*' .
|
||||
\ '\(' . cmake_regex_comment . '\)\?$'
|
||||
|
||||
let cmake_indent_begin_regex = '^\s*\(IF\|MACRO\|FOREACH\|ELSE\|ELSEIF\|WHILE\|FUNCTION\)\s*('
|
||||
let cmake_indent_end_regex = '^\s*\(ENDIF\|ENDFOREACH\|ENDMACRO\|ELSE\|ELSEIF\|ENDWHILE\|ENDFUNCTION\)\s*('
|
||||
|
||||
" Add
|
||||
if previous_line =~? cmake_indent_comment_line " Handle comments
|
||||
let ind = ind
|
||||
else
|
||||
if previous_line =~? cmake_indent_begin_regex
|
||||
let ind = ind + shiftwidth()
|
||||
endif
|
||||
if previous_line =~? cmake_indent_open_regex
|
||||
let ind = ind + shiftwidth()
|
||||
endif
|
||||
endif
|
||||
|
||||
" Subtract
|
||||
if this_line =~? cmake_indent_end_regex
|
||||
let ind = ind - shiftwidth()
|
||||
endif
|
||||
if previous_line =~? cmake_indent_close_regex
|
||||
let ind = ind - shiftwidth()
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfun
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
300
bundle/vim-cmake-syntax/modules/Doxygen.json
Normal file
300
bundle/vim-cmake-syntax/modules/Doxygen.json
Normal file
@ -0,0 +1,300 @@
|
||||
{
|
||||
"variables": [
|
||||
"DOXYGEN_ABBREVIATE_BRIEF",
|
||||
"DOXYGEN_ALIASES",
|
||||
"DOXYGEN_ALLEXTERNALS",
|
||||
"DOXYGEN_ALLOW_UNICODE_NAMES",
|
||||
"DOXYGEN_ALPHABETICAL_INDEX",
|
||||
"DOXYGEN_ALWAYS_DETAILED_SEC",
|
||||
"DOXYGEN_AUTOLINK_SUPPORT",
|
||||
"DOXYGEN_BINARY_TOC",
|
||||
"DOXYGEN_BRIEF_MEMBER_DESC",
|
||||
"DOXYGEN_BUILTIN_STL_SUPPORT",
|
||||
"DOXYGEN_CALLER_GRAPH",
|
||||
"DOXYGEN_CALL_GRAPH",
|
||||
"DOXYGEN_CASE_SENSE_NAMES",
|
||||
"DOXYGEN_CHM_FILE",
|
||||
"DOXYGEN_CHM_INDEX_ENCODING",
|
||||
"DOXYGEN_CITE_BIB_FILES",
|
||||
"DOXYGEN_CLANG_ASSISTED_PARSING",
|
||||
"DOXYGEN_CLANG_DATABASE_PATH",
|
||||
"DOXYGEN_CLANG_OPTIONS",
|
||||
"DOXYGEN_CLASS_DIAGRAMS",
|
||||
"DOXYGEN_CLASS_GRAPH",
|
||||
"DOXYGEN_COLLABORATION_GRAPH",
|
||||
"DOXYGEN_COLS_IN_ALPHA_INDEX",
|
||||
"DOXYGEN_COMPACT_LATEX",
|
||||
"DOXYGEN_COMPACT_RTF",
|
||||
"DOXYGEN_CPP_CLI_SUPPORT",
|
||||
"DOXYGEN_CREATE_SUBDIRS",
|
||||
"DOXYGEN_DIAFILE_DIRS",
|
||||
"DOXYGEN_DIA_PATH",
|
||||
"DOXYGEN_DIRECTORY_GRAPH",
|
||||
"DOXYGEN_DISABLE_INDEX",
|
||||
"DOXYGEN_DISTRIBUTE_GROUP_DOC",
|
||||
"DOXYGEN_DOCBOOK_OUTPUT",
|
||||
"DOXYGEN_DOCBOOK_PROGRAMLISTING",
|
||||
"DOXYGEN_DOCSET_BUNDLE_ID",
|
||||
"DOXYGEN_DOCSET_FEEDNAME",
|
||||
"DOXYGEN_DOCSET_PUBLISHER_ID",
|
||||
"DOXYGEN_DOCSET_PUBLISHER_NAME",
|
||||
"DOXYGEN_DOTFILE_DIRS",
|
||||
"DOXYGEN_DOT_CLEANUP",
|
||||
"DOXYGEN_DOT_FONTNAME",
|
||||
"DOXYGEN_DOT_FONTPATH",
|
||||
"DOXYGEN_DOT_FONTSIZE",
|
||||
"DOXYGEN_DOT_GRAPH_MAX_NODES",
|
||||
"DOXYGEN_DOT_IMAGE_FORMAT",
|
||||
"DOXYGEN_DOT_MULTI_TARGETS",
|
||||
"DOXYGEN_DOT_NUM_THREADS",
|
||||
"DOXYGEN_DOT_PATH",
|
||||
"DOXYGEN_DOT_TRANSPARENT",
|
||||
"DOXYGEN_DOXYFILE_ENCODING",
|
||||
"DOXYGEN_ECLIPSE_DOC_ID",
|
||||
"DOXYGEN_ENABLED_SECTIONS",
|
||||
"DOXYGEN_ENABLE_PREPROCESSING",
|
||||
"DOXYGEN_ENUM_VALUES_PER_LINE",
|
||||
"DOXYGEN_EXAMPLE_PATH",
|
||||
"DOXYGEN_EXAMPLE_PATTERNS",
|
||||
"DOXYGEN_EXAMPLE_RECURSIVE",
|
||||
"DOXYGEN_EXCLUDE",
|
||||
"DOXYGEN_EXCLUDE_PATTERNS",
|
||||
"DOXYGEN_EXCLUDE_SYMBOLS",
|
||||
"DOXYGEN_EXCLUDE_SYMLINKS",
|
||||
"DOXYGEN_EXPAND_AS_DEFINED",
|
||||
"DOXYGEN_EXPAND_ONLY_PREDEF",
|
||||
"DOXYGEN_EXTENSION_MAPPING",
|
||||
"DOXYGEN_EXTERNAL_GROUPS",
|
||||
"DOXYGEN_EXTERNAL_PAGES",
|
||||
"DOXYGEN_EXTERNAL_SEARCH",
|
||||
"DOXYGEN_EXTERNAL_SEARCH_ID",
|
||||
"DOXYGEN_EXTRACT_ALL",
|
||||
"DOXYGEN_EXTRACT_ANON_NSPACES",
|
||||
"DOXYGEN_EXTRACT_LOCAL_CLASSES",
|
||||
"DOXYGEN_EXTRACT_LOCAL_METHODS",
|
||||
"DOXYGEN_EXTRACT_PACKAGE",
|
||||
"DOXYGEN_EXTRACT_PRIVATE",
|
||||
"DOXYGEN_EXTRACT_PRIV_VIRTUAL",
|
||||
"DOXYGEN_EXTRACT_STATIC",
|
||||
"DOXYGEN_EXTRA_PACKAGES",
|
||||
"DOXYGEN_EXTRA_SEARCH_MAPPINGS",
|
||||
"DOXYGEN_EXT_LINKS_IN_WINDOW",
|
||||
"DOXYGEN_FILE_PATTERNS",
|
||||
"DOXYGEN_FILE_VERSION_FILTER",
|
||||
"DOXYGEN_FILTER_PATTERNS",
|
||||
"DOXYGEN_FILTER_SOURCE_FILES",
|
||||
"DOXYGEN_FILTER_SOURCE_PATTERNS",
|
||||
"DOXYGEN_FORCE_LOCAL_INCLUDES",
|
||||
"DOXYGEN_FORMULA_FONTSIZE",
|
||||
"DOXYGEN_FORMULA_TRANSPARENT",
|
||||
"DOXYGEN_FULL_PATH_NAMES",
|
||||
"DOXYGEN_GENERATE_AUTOGEN_DEF",
|
||||
"DOXYGEN_GENERATE_BUGLIST",
|
||||
"DOXYGEN_GENERATE_CHI",
|
||||
"DOXYGEN_GENERATE_DEPRECATEDLIST",
|
||||
"DOXYGEN_GENERATE_DOCBOOK",
|
||||
"DOXYGEN_GENERATE_DOCSET",
|
||||
"DOXYGEN_GENERATE_ECLIPSEHELP",
|
||||
"DOXYGEN_GENERATE_HTML",
|
||||
"DOXYGEN_GENERATE_HTMLHELP",
|
||||
"DOXYGEN_GENERATE_LATEX",
|
||||
"DOXYGEN_GENERATE_LEGEND",
|
||||
"DOXYGEN_GENERATE_MAN",
|
||||
"DOXYGEN_GENERATE_PERLMOD",
|
||||
"DOXYGEN_GENERATE_QHP",
|
||||
"DOXYGEN_GENERATE_RTF",
|
||||
"DOXYGEN_GENERATE_TAGFILE",
|
||||
"DOXYGEN_GENERATE_TESTLIST",
|
||||
"DOXYGEN_GENERATE_TODOLIST",
|
||||
"DOXYGEN_GENERATE_TREEVIEW",
|
||||
"DOXYGEN_GENERATE_XML",
|
||||
"DOXYGEN_GRAPHICAL_HIERARCHY",
|
||||
"DOXYGEN_GROUP_GRAPHS",
|
||||
"DOXYGEN_GROUP_NESTED_COMPOUNDS",
|
||||
"DOXYGEN_HAVE_DOT",
|
||||
"DOXYGEN_HHC_LOCATION",
|
||||
"DOXYGEN_HIDE_COMPOUND_REFERENCE",
|
||||
"DOXYGEN_HIDE_FRIEND_COMPOUNDS",
|
||||
"DOXYGEN_HIDE_IN_BODY_DOCS",
|
||||
"DOXYGEN_HIDE_SCOPE_NAMES",
|
||||
"DOXYGEN_HIDE_UNDOC_CLASSES",
|
||||
"DOXYGEN_HIDE_UNDOC_MEMBERS",
|
||||
"DOXYGEN_HIDE_UNDOC_RELATIONS",
|
||||
"DOXYGEN_HTML_COLORSTYLE_GAMMA",
|
||||
"DOXYGEN_HTML_COLORSTYLE_HUE",
|
||||
"DOXYGEN_HTML_COLORSTYLE_SAT",
|
||||
"DOXYGEN_HTML_DYNAMIC_MENUS",
|
||||
"DOXYGEN_HTML_DYNAMIC_SECTIONS",
|
||||
"DOXYGEN_HTML_EXTRA_FILES",
|
||||
"DOXYGEN_HTML_EXTRA_STYLESHEET",
|
||||
"DOXYGEN_HTML_FILE_EXTENSION",
|
||||
"DOXYGEN_HTML_FOOTER",
|
||||
"DOXYGEN_HTML_HEADER",
|
||||
"DOXYGEN_HTML_INDEX_NUM_ENTRIES",
|
||||
"DOXYGEN_HTML_OUTPUT",
|
||||
"DOXYGEN_HTML_STYLESHEET",
|
||||
"DOXYGEN_HTML_TIMESTAMP",
|
||||
"DOXYGEN_IDL_PROPERTY_SUPPORT",
|
||||
"DOXYGEN_IGNORE_PREFIX",
|
||||
"DOXYGEN_IMAGE_PATH",
|
||||
"DOXYGEN_INCLUDED_BY_GRAPH",
|
||||
"DOXYGEN_INCLUDE_FILE_PATTERNS",
|
||||
"DOXYGEN_INCLUDE_GRAPH",
|
||||
"DOXYGEN_INCLUDE_PATH",
|
||||
"DOXYGEN_INHERIT_DOCS",
|
||||
"DOXYGEN_INLINE_GROUPED_CLASSES",
|
||||
"DOXYGEN_INLINE_INFO",
|
||||
"DOXYGEN_INLINE_INHERITED_MEMB",
|
||||
"DOXYGEN_INLINE_SIMPLE_STRUCTS",
|
||||
"DOXYGEN_INLINE_SOURCES",
|
||||
"DOXYGEN_INPUT",
|
||||
"DOXYGEN_INPUT_ENCODING",
|
||||
"DOXYGEN_INPUT_FILTER",
|
||||
"DOXYGEN_INTERACTIVE_SVG",
|
||||
"DOXYGEN_INTERNAL_DOCS",
|
||||
"DOXYGEN_JAVADOC_AUTOBRIEF",
|
||||
"DOXYGEN_JAVADOC_BANNER",
|
||||
"DOXYGEN_LATEX_BATCHMODE",
|
||||
"DOXYGEN_LATEX_BIB_STYLE",
|
||||
"DOXYGEN_LATEX_CMD_NAME",
|
||||
"DOXYGEN_LATEX_EMOJI_DIRECTORY",
|
||||
"DOXYGEN_LATEX_EXTRA_FILES",
|
||||
"DOXYGEN_LATEX_EXTRA_STYLESHEET",
|
||||
"DOXYGEN_LATEX_FOOTER",
|
||||
"DOXYGEN_LATEX_HEADER",
|
||||
"DOXYGEN_LATEX_HIDE_INDICES",
|
||||
"DOXYGEN_LATEX_MAKEINDEX_CMD",
|
||||
"DOXYGEN_LATEX_OUTPUT",
|
||||
"DOXYGEN_LATEX_SOURCE_CODE",
|
||||
"DOXYGEN_LATEX_TIMESTAMP",
|
||||
"DOXYGEN_LAYOUT_FILE",
|
||||
"DOXYGEN_LOOKUP_CACHE_SIZE",
|
||||
"DOXYGEN_MACRO_EXPANSION",
|
||||
"DOXYGEN_MAKEINDEX_CMD_NAME",
|
||||
"DOXYGEN_MAN_EXTENSION",
|
||||
"DOXYGEN_MAN_LINKS",
|
||||
"DOXYGEN_MAN_OUTPUT",
|
||||
"DOXYGEN_MAN_SUBDIR",
|
||||
"DOXYGEN_MARKDOWN_SUPPORT",
|
||||
"DOXYGEN_MATHJAX_CODEFILE",
|
||||
"DOXYGEN_MATHJAX_EXTENSIONS",
|
||||
"DOXYGEN_MATHJAX_FORMAT",
|
||||
"DOXYGEN_MATHJAX_RELPATH",
|
||||
"DOXYGEN_MAX_DOT_GRAPH_DEPTH",
|
||||
"DOXYGEN_MAX_INITIALIZER_LINES",
|
||||
"DOXYGEN_MSCFILE_DIRS",
|
||||
"DOXYGEN_MULTILINE_CPP_IS_BRIEF",
|
||||
"DOXYGEN_OPTIMIZE_FOR_FORTRAN",
|
||||
"DOXYGEN_OPTIMIZE_OUTPUT_FOR_C",
|
||||
"DOXYGEN_OPTIMIZE_OUTPUT_JAVA",
|
||||
"DOXYGEN_OPTIMIZE_OUTPUT_SLICE",
|
||||
"DOXYGEN_OPTIMIZE_OUTPUT_VHDL",
|
||||
"DOXYGEN_OUTPUT_DIRECTORY",
|
||||
"DOXYGEN_OUTPUT_LANGUAGE",
|
||||
"DOXYGEN_OUTPUT_TEXT_DIRECTION",
|
||||
"DOXYGEN_PAPER_TYPE",
|
||||
"DOXYGEN_PDF_HYPERLINKS",
|
||||
"DOXYGEN_PERLMOD_LATEX",
|
||||
"DOXYGEN_PERLMOD_MAKEVAR_PREFIX",
|
||||
"DOXYGEN_PERLMOD_PRETTY",
|
||||
"DOXYGEN_PLANTUML_CFG_FILE",
|
||||
"DOXYGEN_PLANTUML_INCLUDE_PATH",
|
||||
"DOXYGEN_PLANTUML_JAR_PATH",
|
||||
"DOXYGEN_PREDEFINED",
|
||||
"DOXYGEN_PROJECT_BRIEF",
|
||||
"DOXYGEN_PROJECT_LOGO",
|
||||
"DOXYGEN_PROJECT_NAME",
|
||||
"DOXYGEN_PROJECT_NUMBER",
|
||||
"DOXYGEN_QCH_FILE",
|
||||
"DOXYGEN_QHG_LOCATION",
|
||||
"DOXYGEN_QHP_CUST_FILTER_ATTRS",
|
||||
"DOXYGEN_QHP_CUST_FILTER_NAME",
|
||||
"DOXYGEN_QHP_NAMESPACE",
|
||||
"DOXYGEN_QHP_SECT_FILTER_ATTRS",
|
||||
"DOXYGEN_QHP_VIRTUAL_FOLDER",
|
||||
"DOXYGEN_QT_AUTOBRIEF",
|
||||
"DOXYGEN_QUIET",
|
||||
"DOXYGEN_RECURSIVE",
|
||||
"DOXYGEN_REFERENCED_BY_RELATION",
|
||||
"DOXYGEN_REFERENCES_LINK_SOURCE",
|
||||
"DOXYGEN_REFERENCES_RELATION",
|
||||
"DOXYGEN_REPEAT_BRIEF",
|
||||
"DOXYGEN_RTF_EXTENSIONS_FILE",
|
||||
"DOXYGEN_RTF_HYPERLINKS",
|
||||
"DOXYGEN_RTF_OUTPUT",
|
||||
"DOXYGEN_RTF_SOURCE_CODE",
|
||||
"DOXYGEN_RTF_STYLESHEET_FILE",
|
||||
"DOXYGEN_SEARCHDATA_FILE",
|
||||
"DOXYGEN_SEARCHENGINE",
|
||||
"DOXYGEN_SEARCHENGINE_URL",
|
||||
"DOXYGEN_SEARCH_INCLUDES",
|
||||
"DOXYGEN_SEPARATE_MEMBER_PAGES",
|
||||
"DOXYGEN_SERVER_BASED_SEARCH",
|
||||
"DOXYGEN_SHORT_NAMES",
|
||||
"DOXYGEN_SHOW_FILES",
|
||||
"DOXYGEN_SHOW_GROUPED_MEMB_INC",
|
||||
"DOXYGEN_SHOW_INCLUDE_FILES",
|
||||
"DOXYGEN_SHOW_NAMESPACES",
|
||||
"DOXYGEN_SHOW_USED_FILES",
|
||||
"DOXYGEN_SIP_SUPPORT",
|
||||
"DOXYGEN_SKIP_FUNCTION_MACROS",
|
||||
"DOXYGEN_SORT_BRIEF_DOCS",
|
||||
"DOXYGEN_SORT_BY_SCOPE_NAME",
|
||||
"DOXYGEN_SORT_GROUP_NAMES",
|
||||
"DOXYGEN_SORT_MEMBERS_CTORS_1ST",
|
||||
"DOXYGEN_SORT_MEMBER_DOCS",
|
||||
"DOXYGEN_SOURCE_BROWSER",
|
||||
"DOXYGEN_SOURCE_TOOLTIPS",
|
||||
"DOXYGEN_STRICT_PROTO_MATCHING",
|
||||
"DOXYGEN_STRIP_CODE_COMMENTS",
|
||||
"DOXYGEN_STRIP_FROM_INC_PATH",
|
||||
"DOXYGEN_STRIP_FROM_PATH",
|
||||
"DOXYGEN_SUBGROUPING",
|
||||
"DOXYGEN_TAB_SIZE",
|
||||
"DOXYGEN_TAGFILES",
|
||||
"DOXYGEN_TCL_SUBST",
|
||||
"DOXYGEN_TEMPLATE_RELATIONS",
|
||||
"DOXYGEN_TOC_EXPAND",
|
||||
"DOXYGEN_TOC_INCLUDE_HEADINGS",
|
||||
"DOXYGEN_TREEVIEW_WIDTH",
|
||||
"DOXYGEN_TYPEDEF_HIDES_STRUCT",
|
||||
"DOXYGEN_UML_LIMIT_NUM_FIELDS",
|
||||
"DOXYGEN_UML_LOOK",
|
||||
"DOXYGEN_USE_HTAGS",
|
||||
"DOXYGEN_USE_MATHJAX",
|
||||
"DOXYGEN_USE_MDFILE_AS_MAINPAGE",
|
||||
"DOXYGEN_USE_PDFLATEX",
|
||||
"DOXYGEN_VERBATIM_HEADERS",
|
||||
"DOXYGEN_WARNINGS",
|
||||
"DOXYGEN_WARN_AS_ERROR",
|
||||
"DOXYGEN_WARN_FORMAT",
|
||||
"DOXYGEN_WARN_IF_DOC_ERROR",
|
||||
"DOXYGEN_WARN_IF_UNDOCUMENTED",
|
||||
"DOXYGEN_WARN_LOGFILE",
|
||||
"DOXYGEN_WARN_NO_PARAMDOC",
|
||||
"DOXYGEN_XML_NS_MEMB_FILE_SCOPE",
|
||||
"DOXYGEN_XML_OUTPUT",
|
||||
"DOXYGEN_XML_PROGRAMLISTING",
|
||||
"DOXYGEN_VERBATIM_VARS",
|
||||
"DOXYGEN_VERSION"
|
||||
],
|
||||
"commands": {
|
||||
"doxygen_add_docs": [
|
||||
"COMMENT",
|
||||
"WORKING_DIRECTORY",
|
||||
"USE_STAMP_FILE",
|
||||
"ALL"
|
||||
]
|
||||
},
|
||||
"targets": [
|
||||
"Doxygen::doxygen",
|
||||
"Doxygen::dot",
|
||||
"Doxygen::mscgen",
|
||||
"Doxygen::dia"
|
||||
],
|
||||
"components": [
|
||||
"dia",
|
||||
"mscgen",
|
||||
"dot"
|
||||
]
|
||||
}
|
4095
bundle/vim-cmake-syntax/syntax/cmake.vim
Normal file
4095
bundle/vim-cmake-syntax/syntax/cmake.vim
Normal file
File diff suppressed because it is too large
Load Diff
12
bundle/vim-cmake-syntax/test/.vimrc
Normal file
12
bundle/vim-cmake-syntax/test/.vimrc
Normal file
@ -0,0 +1,12 @@
|
||||
" we need a clean environment
|
||||
|
||||
" remove user's .vimrc - what else?
|
||||
set runtimepath-=~/.vimrc
|
||||
|
||||
" add .. as vim-plugin-path (for syntax)
|
||||
set runtimepath^=../
|
||||
|
||||
" nocompat is needed for html-output
|
||||
set nocompatible
|
||||
|
||||
syntax on
|
18
bundle/vim-cmake-syntax/test/CMakeLists.txt
Normal file
18
bundle/vim-cmake-syntax/test/CMakeLists.txt
Normal file
@ -0,0 +1,18 @@
|
||||
project(vim-cmake-syntax-test)
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
macro(test TESTNAME)
|
||||
add_test(NAME ${TESTNAME}
|
||||
COMMAND ./run-test.sh ${TESTNAME}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
||||
endmacro()
|
||||
|
||||
file(GLOB TESTS *.cmake)
|
||||
|
||||
enable_testing()
|
||||
|
||||
foreach(TEST IN LISTS TESTS)
|
||||
get_filename_component(TESTNAME ${TEST} NAME_WE)
|
||||
test(${TESTNAME})
|
||||
endforeach()
|
49
bundle/vim-cmake-syntax/test/bracket-args-and-comment.cmake
Normal file
49
bundle/vim-cmake-syntax/test/bracket-args-and-comment.cmake
Normal file
@ -0,0 +1,49 @@
|
||||
message(FATAL_ERROR [[
|
||||
This is the first line in a bracket argument with bracket length 1.
|
||||
No \-escape sequences or ${variable} references are evaluated.
|
||||
This is always one argument even though it contains a ; character.
|
||||
It does end in a closing bracket of length 1.
|
||||
]])
|
||||
|
||||
message(FATAL_ERROR [=[
|
||||
This is the first line in a bracket argument with bracket length 1.
|
||||
No \-escape sequences or ${variable} references are evaluated.
|
||||
This is always one argument even though it contains a ; character.
|
||||
The text does not end on a closing bracket of length 0 like ]].
|
||||
It does end in a closing bracket of length 1.
|
||||
]=])
|
||||
|
||||
message(FATAL_ERROR [=123[
|
||||
This is the first line in a bracket argument with bracket length 1.
|
||||
No \-escape sequences or ${variable} references are evaluated.
|
||||
This is always one argument even though it contains a ; character.
|
||||
The text does not end on a closing bracket of length 0 like ]].
|
||||
It does end in a closing bracket of length 1.
|
||||
]=123])
|
||||
|
||||
[[ # this will make a cmake-error but defines a bracket-arguemnt
|
||||
cmake_minimum_required(VERSION 4.0 FATAL_ERROR) # Should be string-colored
|
||||
]]
|
||||
|
||||
#[[
|
||||
cmake_minimum_required(VERSION 4.0 FATAL_ERROR) # Should be greyed out
|
||||
]] target_link_libraries(t lib)
|
||||
|
||||
#[[
|
||||
cmake_minimum_required(VERSION 4.0 FATAL_ERROR) # Should be greyed out
|
||||
#]] target_link_libraries(t lib)
|
||||
|
||||
# commented bracket-comment
|
||||
##[[
|
||||
cmake_minimum_required(VERSION 4.0 FATAL_ERROR) # Should not be greyed out
|
||||
#]]
|
||||
|
||||
#[[This is a bracket comment.
|
||||
It runs until the close bracket.]]
|
||||
|
||||
message("First Argument\n" #[[Bracket Comment]] "Second Argument")
|
||||
|
||||
#[=12[
|
||||
comment
|
||||
]=12]
|
||||
|
@ -0,0 +1,53 @@
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
<span class="Identifier">message</span>(<span class="ModeMsg">FATAL_ERROR</span> <span class="Constant">[[</span>
|
||||
<span class="Constant">This is the first line in a bracket argument with bracket length 1.</span>
|
||||
<span class="Constant">No \-escape sequences or ${variable} references are evaluated.</span>
|
||||
<span class="Constant">This is always one argument even though it contains a ; character.</span>
|
||||
<span class="Constant">It does end in a closing bracket of length 1.</span>
|
||||
<span class="Constant">]]</span>)
|
||||
|
||||
<span class="Identifier">message</span>(<span class="ModeMsg">FATAL_ERROR</span> <span class="Constant">[=[</span>
|
||||
<span class="Constant">This is the first line in a bracket argument with bracket length 1.</span>
|
||||
<span class="Constant">No \-escape sequences or ${variable} references are evaluated.</span>
|
||||
<span class="Constant">This is always one argument even though it contains a ; character.</span>
|
||||
<span class="Constant">The text does not end on a closing bracket of length 0 like ]].</span>
|
||||
<span class="Constant">It does end in a closing bracket of length 1.</span>
|
||||
<span class="Constant">]=]</span>)
|
||||
|
||||
<span class="Identifier">message</span>(<span class="ModeMsg">FATAL_ERROR</span> <span class="Constant">[=123[</span>
|
||||
<span class="Constant">This is the first line in a bracket argument with bracket length 1.</span>
|
||||
<span class="Constant">No \-escape sequences or ${variable} references are evaluated.</span>
|
||||
<span class="Constant">This is always one argument even though it contains a ; character.</span>
|
||||
<span class="Constant">The text does not end on a closing bracket of length 0 like ]].</span>
|
||||
<span class="Constant">It does end in a closing bracket of length 1.</span>
|
||||
<span class="Constant">]=123]</span>)
|
||||
|
||||
<span class="Constant">[[ # this will make a cmake-error but defines a bracket-arguemnt</span>
|
||||
<span class="Constant">cmake_minimum_required(VERSION 4.0 FATAL_ERROR) # Should be string-colored</span>
|
||||
<span class="Constant">]]</span>
|
||||
|
||||
<span class="Comment">#[[</span>
|
||||
<span class="Comment">cmake_minimum_required(VERSION 4.0 FATAL_ERROR) # Should be greyed out</span>
|
||||
<span class="Comment">]]</span> <span class="Identifier">target_link_libraries</span>(t lib)
|
||||
|
||||
<span class="Comment">#[[</span>
|
||||
<span class="Comment">cmake_minimum_required(VERSION 4.0 FATAL_ERROR) # Should be greyed out</span>
|
||||
<span class="Comment">#]]</span> <span class="Identifier">target_link_libraries</span>(t lib)
|
||||
|
||||
<span class="Comment"># commented bracket-comment</span>
|
||||
<span class="Comment">##[[</span>
|
||||
<span class="Identifier">cmake_minimum_required</span>(<span class="ModeMsg">VERSION</span> 4.0 <span class="ModeMsg">FATAL_ERROR</span>) <span class="Comment"># Should not be greyed out</span>
|
||||
<span class="Comment">#]]</span>
|
||||
|
||||
<span class="Comment">#[[This is a bracket comment.</span>
|
||||
<span class="Comment">It runs until the close bracket.]]</span>
|
||||
|
||||
<span class="Identifier">message</span>(<span class="Constant">"First Argument</span><span class="Special">\n</span><span class="Constant">"</span> <span class="Comment">#[[Bracket Comment]]</span> <span class="Constant">"Second Argument"</span>)
|
||||
|
||||
<span class="Comment">#[=12[</span>
|
||||
<span class="Comment">comment</span>
|
||||
<span class="Comment">]=12]</span>
|
||||
|
||||
</pre>
|
||||
</body>
|
1
bundle/vim-cmake-syntax/test/command-as-args.cmake
Normal file
1
bundle/vim-cmake-syntax/test/command-as-args.cmake
Normal file
@ -0,0 +1 @@
|
||||
add_custom_command(add_custom_command) # inner add_custom_command should not be highlighted
|
@ -0,0 +1,5 @@
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
<span class="Identifier">add_custom_command</span>(add_custom_command) <span class="Comment"># inner add_custom_command should not be highlighted</span>
|
||||
</pre>
|
||||
</body>
|
1
bundle/vim-cmake-syntax/test/escaped-quotes.cmake
Normal file
1
bundle/vim-cmake-syntax/test/escaped-quotes.cmake
Normal file
@ -0,0 +1 @@
|
||||
string(REPLACE "\"" "'" ${FOO} ${BAR}) # a comment
|
@ -0,0 +1,5 @@
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
<span class="Identifier">string</span>(<span class="ModeMsg">REPLACE</span> <span class="Constant">"</span><span class="Special">\"</span><span class="Constant">"</span> <span class="Constant">"'"</span> <span class="Type">${FOO}</span> <span class="Type">${BAR}</span>) <span class="Comment"># a comment</span>
|
||||
</pre>
|
||||
</body>
|
@ -0,0 +1,2 @@
|
||||
# not the same highlighting for PUBLIC if simple argument or in generator expression
|
||||
target_include_directories(target PUBLIC ${CMAKE_CURRENT_BINARY_DIR} $<GENERATOR_EXP PUBLIC>)
|
@ -0,0 +1,6 @@
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
<span class="Comment"># not the same highlighting for PUBLIC if simple argument or in generator expression</span>
|
||||
<span class="Identifier">target_include_directories</span>(target <span class="ModeMsg">PUBLIC</span> <span class="Type">${</span><span class="Identifier">CMAKE_CURRENT_BINARY_DIR</span><span class="Type">}</span> <span class="WarningMsg">$<GENERATOR_EXP </span><span class="Constant">PUBLIC</span><span class="WarningMsg">></span>)
|
||||
</pre>
|
||||
</body>
|
22
bundle/vim-cmake-syntax/test/package-config-helpers.cmake
Normal file
22
bundle/vim-cmake-syntax/test/package-config-helpers.cmake
Normal file
@ -0,0 +1,22 @@
|
||||
write_basic_package_version_file(file1
|
||||
VERSION 3.2.1
|
||||
COMPATIBILITY AnyNewerVersion)
|
||||
|
||||
write_basic_package_version_file(file2
|
||||
VERSION 3.2.1
|
||||
COMPATIBILITY SameMajorVersion)
|
||||
|
||||
write_basic_package_version_file(file3
|
||||
VERSION 3.2.1
|
||||
COMPATIBILITY SameMinorVersion)
|
||||
|
||||
write_basic_package_version_file(file4
|
||||
VERSION 3.2.1
|
||||
COMPATIBILITY ExactVersion)
|
||||
|
||||
configure_package_config_file(input output
|
||||
INSTALL_DESTINATION path/to
|
||||
PATH_VARS ${var1} ${var1}
|
||||
NO_SET_AND_CHECK_MACRO
|
||||
NO_CHECK_REQUIRED_COMPONENTS_MACRO
|
||||
INSTALL_PREFIX path/to)
|
@ -0,0 +1,26 @@
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
<span class="Identifier">write_basic_package_version_file</span>(file1
|
||||
<span class="ModeMsg">VERSION</span> 3.2.1
|
||||
<span class="ModeMsg">COMPATIBILITY</span> <span class="Constant">AnyNewerVersion</span>)
|
||||
|
||||
<span class="Identifier">write_basic_package_version_file</span>(file2
|
||||
<span class="ModeMsg">VERSION</span> 3.2.1
|
||||
<span class="ModeMsg">COMPATIBILITY</span> <span class="Constant">SameMajorVersion</span>)
|
||||
|
||||
<span class="Identifier">write_basic_package_version_file</span>(file3
|
||||
<span class="ModeMsg">VERSION</span> 3.2.1
|
||||
<span class="ModeMsg">COMPATIBILITY</span> <span class="Constant">SameMinorVersion</span>)
|
||||
|
||||
<span class="Identifier">write_basic_package_version_file</span>(file4
|
||||
<span class="ModeMsg">VERSION</span> 3.2.1
|
||||
<span class="ModeMsg">COMPATIBILITY</span> <span class="Constant">ExactVersion</span>)
|
||||
|
||||
<span class="Identifier">configure_package_config_file</span>(input output
|
||||
<span class="ModeMsg">INSTALL_DESTINATION</span> path/to
|
||||
<span class="ModeMsg">PATH_VARS</span> <span class="Type">${var1}</span> <span class="Type">${var1}</span>
|
||||
<span class="ModeMsg">NO_SET_AND_CHECK_MACRO</span>
|
||||
<span class="ModeMsg">NO_CHECK_REQUIRED_COMPONENTS_MACRO</span>
|
||||
<span class="ModeMsg">INSTALL_PREFIX</span> path/to)
|
||||
</pre>
|
||||
</body>
|
23
bundle/vim-cmake-syntax/test/run-test.sh
Normal file
23
bundle/vim-cmake-syntax/test/run-test.sh
Normal file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
TMP=$(mktemp)
|
||||
|
||||
# generate html-file with local .vimrc and local syntax highlighting and only that!
|
||||
vim -u .vimrc -n -es -c TOhtml -c "w! $TMP" -c 'qa!' $1.cmake >/dev/null 2>&1
|
||||
|
||||
# extract the body of the html-file
|
||||
sed -i -n -e '/<body>/,$p' $TMP
|
||||
sed -i '/<\/body>/q' $TMP
|
||||
|
||||
# diff with references
|
||||
diff -u $1.cmake.html.ref $TMP
|
||||
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "reference is not identifcal to output, produced file kept: $TMP"
|
||||
exit 1
|
||||
else
|
||||
rm $TMP
|
||||
exit 0
|
||||
fi
|
||||
|
7
bundle/vim-cmake-syntax/test/variable-as-varname.cmake
Normal file
7
bundle/vim-cmake-syntax/test/variable-as-varname.cmake
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
|
||||
set(HOST "Linux")
|
||||
set(CPU "x86_64")
|
||||
set(Linux_x86_64 "Hello")
|
||||
|
||||
message(STATUS ${${HOST}_${CPU}})
|
@ -0,0 +1,11 @@
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
|
||||
|
||||
<span class="Identifier">set</span>(HOST <span class="Constant">"Linux"</span>)
|
||||
<span class="Identifier">set</span>(<span class="ModeMsg">CPU</span> <span class="Constant">"x86_64"</span>)
|
||||
<span class="Identifier">set</span>(Linux_x86_64 <span class="Constant">"Hello"</span>)
|
||||
|
||||
<span class="Identifier">message</span>(<span class="ModeMsg">STATUS</span> <span class="Type">${${HOST}_${CPU}}</span>)
|
||||
</pre>
|
||||
</body>
|
222
doc/SpaceVim.txt
222
doc/SpaceVim.txt
@ -128,111 +128,112 @@ CONTENTS *SpaceVim-contents*
|
||||
33. lang#c......................................|SpaceVim-layers-lang-c|
|
||||
34. lang#chapel............................|SpaceVim-layers-lang-chapel|
|
||||
35. lang#clojure..........................|SpaceVim-layers-lang-clojure|
|
||||
36. lang#coffeescript................|SpaceVim-layers-lang-coffeescript|
|
||||
37. lang#crystal..........................|SpaceVim-layers-lang-crystal|
|
||||
38. lang#csharp............................|SpaceVim-layers-lang-csharp|
|
||||
39. lang#d......................................|SpaceVim-layers-lang-d|
|
||||
40. lang#dart................................|SpaceVim-layers-lang-dart|
|
||||
41. lang#dockerfile....................|SpaceVim-layers-lang-dockerfile|
|
||||
42. lang#e......................................|SpaceVim-layers-lang-e|
|
||||
43. lang#eiffel............................|SpaceVim-layers-lang-eiffel|
|
||||
44. lang#elixir............................|SpaceVim-layers-lang-elixir|
|
||||
45. lang#elm..................................|SpaceVim-layers-lang-elm|
|
||||
46. lang#erlang............................|SpaceVim-layers-lang-erlang|
|
||||
47. lang#extra..............................|SpaceVim-layers-lang-extra|
|
||||
48. lang#fennel............................|SpaceVim-layers-lang-fennel|
|
||||
49. lang#forth..............................|SpaceVim-layers-lang-forth|
|
||||
50. lang#fortran..........................|SpaceVim-layers-lang-fortran|
|
||||
51. lang#foxpro............................|SpaceVim-layers-lang-foxpro|
|
||||
52. lang#fsharp............................|SpaceVim-layers-lang-fsharp|
|
||||
53. lang#go....................................|SpaceVim-layers-lang-go|
|
||||
54. lang#goby................................|SpaceVim-layers-lang-goby|
|
||||
55. lang#gosu................................|SpaceVim-layers-lang-gosu|
|
||||
56. lang#graphql..........................|SpaceVim-layers-lang-graphql|
|
||||
57. lang#groovy............................|SpaceVim-layers-lang-groovy|
|
||||
58. lang#hack................................|SpaceVim-layers-lang-hack|
|
||||
59. lang#haskell..........................|SpaceVim-layers-lang-haskell|
|
||||
60. lang#haxe................................|SpaceVim-layers-lang-haxe|
|
||||
61. lang#html................................|SpaceVim-layers-lang-html|
|
||||
62. lang#hy....................................|SpaceVim-layers-lang-hy|
|
||||
63. lang#idris..............................|SpaceVim-layers-lang-idris|
|
||||
64. lang#io....................................|SpaceVim-layers-lang-io|
|
||||
65. lang#j......................................|SpaceVim-layers-lang-j|
|
||||
66. lang#janet..............................|SpaceVim-layers-lang-janet|
|
||||
67. lang#java................................|SpaceVim-layers-lang-java|
|
||||
68. lang#javascript....................|SpaceVim-layers-lang-javascript|
|
||||
69. lang#jr....................................|SpaceVim-layers-lang-jr|
|
||||
70. lang#json................................|SpaceVim-layers-lang-json|
|
||||
71. lang#jsonnet..........................|SpaceVim-layers-lang-jsonnet|
|
||||
72. lang#julia..............................|SpaceVim-layers-lang-julia|
|
||||
73. lang#kotlin............................|SpaceVim-layers-lang-kotlin|
|
||||
74. lang#latex..............................|SpaceVim-layers-lang-latex|
|
||||
75. lang#lisp................................|SpaceVim-layers-lang-lisp|
|
||||
76. lang#livescript....................|SpaceVim-layers-lang-livescript|
|
||||
77. lang#lua..................................|SpaceVim-layers-lang-lua|
|
||||
78. lang#markdown........................|SpaceVim-layers-lang-markdown|
|
||||
79. lang#moonscript....................|SpaceVim-layers-lang-moonscript|
|
||||
80. lang#nim..................................|SpaceVim-layers-lang-nim|
|
||||
81. lang#nix..................................|SpaceVim-layers-lang-nix|
|
||||
82. lang#ocaml..............................|SpaceVim-layers-lang-ocaml|
|
||||
83. lang#octave............................|SpaceVim-layers-lang-octave|
|
||||
84. lang#pact................................|SpaceVim-layers-lang-pact|
|
||||
85. lang#pascal............................|SpaceVim-layers-lang-pascal|
|
||||
86. lang#perl................................|SpaceVim-layers-lang-perl|
|
||||
87. lang#php..................................|SpaceVim-layers-lang-php|
|
||||
88. lang#plantuml........................|SpaceVim-layers-lang-plantuml|
|
||||
89. lang#pony................................|SpaceVim-layers-lang-pony|
|
||||
90. lang#postscript....................|SpaceVim-layers-lang-postscript|
|
||||
91. lang#processing....................|SpaceVim-layers-lang-processing|
|
||||
92. lang#prolog............................|SpaceVim-layers-lang-prolog|
|
||||
93. lang#puppet............................|SpaceVim-layers-lang-puppet|
|
||||
94. lang#purescript....................|SpaceVim-layers-lang-purescript|
|
||||
95. lang#python............................|SpaceVim-layers-lang-python|
|
||||
96. lang#racket............................|SpaceVim-layers-lang-racket|
|
||||
97. lang#racket...............................|SpaceVim-layers-lang-red|
|
||||
98. lang#reason............................|SpaceVim-layers-lang-reason|
|
||||
99. lang#ring...................................|SpaceVim-layers-lang-r|
|
||||
100. lang#ring...............................|SpaceVim-layers-lang-ring|
|
||||
101. lang#ruby...............................|SpaceVim-layers-lang-ruby|
|
||||
102. lang#rust...............................|SpaceVim-layers-lang-rust|
|
||||
103. lang#scala.............................|SpaceVim-layers-lang-scala|
|
||||
104. lang#scheme...........................|SpaceVim-layers-lang-scheme|
|
||||
105. lang#sh...................................|SpaceVim-layers-lang-sh|
|
||||
106. lang#smalltalk.....................|SpaceVim-layers-lang-smalltalk|
|
||||
107. lang#sml.................................|SpaceVim-layers-lang-sml|
|
||||
108. lang#swig..............................|SpaceVim-layers-lang-swift|
|
||||
109. lang#swig...............................|SpaceVim-layers-lang-swig|
|
||||
110. lang#tcl.................................|SpaceVim-layers-lang-tcl|
|
||||
111. lang#teal...............................|SpaceVim-layers-lang-teal|
|
||||
112. lang#toml...............................|SpaceVim-layers-lang-toml|
|
||||
113. lang#typescript...................|SpaceVim-layers-lang-typescript|
|
||||
114. lang#v.....................................|SpaceVim-layers-lang-v|
|
||||
115. lang#vala...............................|SpaceVim-layers-lang-vala|
|
||||
116. lang#vbnet.............................|SpaceVim-layers-lang-vbnet|
|
||||
117. lang#verilog.........................|SpaceVim-layers-lang-verilog|
|
||||
118. lang#vim.................................|SpaceVim-layers-lang-vim|
|
||||
119. lang#vue.................................|SpaceVim-layers-lang-vue|
|
||||
120. lang#wdl.................................|SpaceVim-layers-lang-wdl|
|
||||
121. lang#wolfram.........................|SpaceVim-layers-lang-wolfram|
|
||||
122. lang#xml.................................|SpaceVim-layers-lang-xml|
|
||||
123. lang#xquery...........................|SpaceVim-layers-lang-xquery|
|
||||
124. lang#yang...............................|SpaceVim-layers-lang-yang|
|
||||
125. lang#zig.................................|SpaceVim-layers-lang-zig|
|
||||
126. language server protocol......................|SpaceVim-layers-lsp|
|
||||
127. leaderf...................................|SpaceVim-layers-leaderf|
|
||||
128. mail.........................................|SpaceVim-layers-mail|
|
||||
129. operator.................................|SpaceVim-layers-operator|
|
||||
130. shell.......................................|SpaceVim-layers-shell|
|
||||
131. ssh...........................................|SpaceVim-layers-ssh|
|
||||
132. telescope...............................|SpaceVim-layers-telescope|
|
||||
133. test.........................................|SpaceVim-layers-test|
|
||||
134. tmux.........................................|SpaceVim-layers-tmux|
|
||||
135. tools#dash.............................|SpaceVim-layers-tools-dash|
|
||||
136. tools#mpv...............................|SpaceVim-layers-tools-mpv|
|
||||
137. tools#zeal.............................|SpaceVim-layers-tools-zeal|
|
||||
138. treesitter.............................|SpaceVim-layers-treesitter|
|
||||
139. ui.............................................|SpaceVim-layers-ui|
|
||||
140. unite.......................................|SpaceVim-layers-unite|
|
||||
36. lang#cmake..............................|SpaceVim-layers-lang-cmake|
|
||||
37. lang#coffeescript................|SpaceVim-layers-lang-coffeescript|
|
||||
38. lang#crystal..........................|SpaceVim-layers-lang-crystal|
|
||||
39. lang#csharp............................|SpaceVim-layers-lang-csharp|
|
||||
40. lang#d......................................|SpaceVim-layers-lang-d|
|
||||
41. lang#dart................................|SpaceVim-layers-lang-dart|
|
||||
42. lang#dockerfile....................|SpaceVim-layers-lang-dockerfile|
|
||||
43. lang#e......................................|SpaceVim-layers-lang-e|
|
||||
44. lang#eiffel............................|SpaceVim-layers-lang-eiffel|
|
||||
45. lang#elixir............................|SpaceVim-layers-lang-elixir|
|
||||
46. lang#elm..................................|SpaceVim-layers-lang-elm|
|
||||
47. lang#erlang............................|SpaceVim-layers-lang-erlang|
|
||||
48. lang#extra..............................|SpaceVim-layers-lang-extra|
|
||||
49. lang#fennel............................|SpaceVim-layers-lang-fennel|
|
||||
50. lang#forth..............................|SpaceVim-layers-lang-forth|
|
||||
51. lang#fortran..........................|SpaceVim-layers-lang-fortran|
|
||||
52. lang#foxpro............................|SpaceVim-layers-lang-foxpro|
|
||||
53. lang#fsharp............................|SpaceVim-layers-lang-fsharp|
|
||||
54. lang#go....................................|SpaceVim-layers-lang-go|
|
||||
55. lang#goby................................|SpaceVim-layers-lang-goby|
|
||||
56. lang#gosu................................|SpaceVim-layers-lang-gosu|
|
||||
57. lang#graphql..........................|SpaceVim-layers-lang-graphql|
|
||||
58. lang#groovy............................|SpaceVim-layers-lang-groovy|
|
||||
59. lang#hack................................|SpaceVim-layers-lang-hack|
|
||||
60. lang#haskell..........................|SpaceVim-layers-lang-haskell|
|
||||
61. lang#haxe................................|SpaceVim-layers-lang-haxe|
|
||||
62. lang#html................................|SpaceVim-layers-lang-html|
|
||||
63. lang#hy....................................|SpaceVim-layers-lang-hy|
|
||||
64. lang#idris..............................|SpaceVim-layers-lang-idris|
|
||||
65. lang#io....................................|SpaceVim-layers-lang-io|
|
||||
66. lang#j......................................|SpaceVim-layers-lang-j|
|
||||
67. lang#janet..............................|SpaceVim-layers-lang-janet|
|
||||
68. lang#java................................|SpaceVim-layers-lang-java|
|
||||
69. lang#javascript....................|SpaceVim-layers-lang-javascript|
|
||||
70. lang#jr....................................|SpaceVim-layers-lang-jr|
|
||||
71. lang#json................................|SpaceVim-layers-lang-json|
|
||||
72. lang#jsonnet..........................|SpaceVim-layers-lang-jsonnet|
|
||||
73. lang#julia..............................|SpaceVim-layers-lang-julia|
|
||||
74. lang#kotlin............................|SpaceVim-layers-lang-kotlin|
|
||||
75. lang#latex..............................|SpaceVim-layers-lang-latex|
|
||||
76. lang#lisp................................|SpaceVim-layers-lang-lisp|
|
||||
77. lang#livescript....................|SpaceVim-layers-lang-livescript|
|
||||
78. lang#lua..................................|SpaceVim-layers-lang-lua|
|
||||
79. lang#markdown........................|SpaceVim-layers-lang-markdown|
|
||||
80. lang#moonscript....................|SpaceVim-layers-lang-moonscript|
|
||||
81. lang#nim..................................|SpaceVim-layers-lang-nim|
|
||||
82. lang#nix..................................|SpaceVim-layers-lang-nix|
|
||||
83. lang#ocaml..............................|SpaceVim-layers-lang-ocaml|
|
||||
84. lang#octave............................|SpaceVim-layers-lang-octave|
|
||||
85. lang#pact................................|SpaceVim-layers-lang-pact|
|
||||
86. lang#pascal............................|SpaceVim-layers-lang-pascal|
|
||||
87. lang#perl................................|SpaceVim-layers-lang-perl|
|
||||
88. lang#php..................................|SpaceVim-layers-lang-php|
|
||||
89. lang#plantuml........................|SpaceVim-layers-lang-plantuml|
|
||||
90. lang#pony................................|SpaceVim-layers-lang-pony|
|
||||
91. lang#postscript....................|SpaceVim-layers-lang-postscript|
|
||||
92. lang#processing....................|SpaceVim-layers-lang-processing|
|
||||
93. lang#prolog............................|SpaceVim-layers-lang-prolog|
|
||||
94. lang#puppet............................|SpaceVim-layers-lang-puppet|
|
||||
95. lang#purescript....................|SpaceVim-layers-lang-purescript|
|
||||
96. lang#python............................|SpaceVim-layers-lang-python|
|
||||
97. lang#racket............................|SpaceVim-layers-lang-racket|
|
||||
98. lang#racket...............................|SpaceVim-layers-lang-red|
|
||||
99. lang#reason............................|SpaceVim-layers-lang-reason|
|
||||
100. lang#ring..................................|SpaceVim-layers-lang-r|
|
||||
101. lang#ring...............................|SpaceVim-layers-lang-ring|
|
||||
102. lang#ruby...............................|SpaceVim-layers-lang-ruby|
|
||||
103. lang#rust...............................|SpaceVim-layers-lang-rust|
|
||||
104. lang#scala.............................|SpaceVim-layers-lang-scala|
|
||||
105. lang#scheme...........................|SpaceVim-layers-lang-scheme|
|
||||
106. lang#sh...................................|SpaceVim-layers-lang-sh|
|
||||
107. lang#smalltalk.....................|SpaceVim-layers-lang-smalltalk|
|
||||
108. lang#sml.................................|SpaceVim-layers-lang-sml|
|
||||
109. lang#swig..............................|SpaceVim-layers-lang-swift|
|
||||
110. lang#swig...............................|SpaceVim-layers-lang-swig|
|
||||
111. lang#tcl.................................|SpaceVim-layers-lang-tcl|
|
||||
112. lang#teal...............................|SpaceVim-layers-lang-teal|
|
||||
113. lang#toml...............................|SpaceVim-layers-lang-toml|
|
||||
114. lang#typescript...................|SpaceVim-layers-lang-typescript|
|
||||
115. lang#v.....................................|SpaceVim-layers-lang-v|
|
||||
116. lang#vala...............................|SpaceVim-layers-lang-vala|
|
||||
117. lang#vbnet.............................|SpaceVim-layers-lang-vbnet|
|
||||
118. lang#verilog.........................|SpaceVim-layers-lang-verilog|
|
||||
119. lang#vim.................................|SpaceVim-layers-lang-vim|
|
||||
120. lang#vue.................................|SpaceVim-layers-lang-vue|
|
||||
121. lang#wdl.................................|SpaceVim-layers-lang-wdl|
|
||||
122. lang#wolfram.........................|SpaceVim-layers-lang-wolfram|
|
||||
123. lang#xml.................................|SpaceVim-layers-lang-xml|
|
||||
124. lang#xquery...........................|SpaceVim-layers-lang-xquery|
|
||||
125. lang#yang...............................|SpaceVim-layers-lang-yang|
|
||||
126. lang#zig.................................|SpaceVim-layers-lang-zig|
|
||||
127. language server protocol......................|SpaceVim-layers-lsp|
|
||||
128. leaderf...................................|SpaceVim-layers-leaderf|
|
||||
129. mail.........................................|SpaceVim-layers-mail|
|
||||
130. operator.................................|SpaceVim-layers-operator|
|
||||
131. shell.......................................|SpaceVim-layers-shell|
|
||||
132. ssh...........................................|SpaceVim-layers-ssh|
|
||||
133. telescope...............................|SpaceVim-layers-telescope|
|
||||
134. test.........................................|SpaceVim-layers-test|
|
||||
135. tmux.........................................|SpaceVim-layers-tmux|
|
||||
136. tools#dash.............................|SpaceVim-layers-tools-dash|
|
||||
137. tools#mpv...............................|SpaceVim-layers-tools-mpv|
|
||||
138. tools#zeal.............................|SpaceVim-layers-tools-zeal|
|
||||
139. treesitter.............................|SpaceVim-layers-treesitter|
|
||||
140. ui.............................................|SpaceVim-layers-ui|
|
||||
141. unite.......................................|SpaceVim-layers-unite|
|
||||
7. Usage....................................................|SpaceVim-usage|
|
||||
1. alternate file........................|SpaceVim-usage-alternate-file|
|
||||
2. buffers-and-files..................|SpaceVim-usage-buffers-and-files|
|
||||
@ -2533,6 +2534,17 @@ This layer also provides REPL support for clojure, the key bindings are:
|
||||
<
|
||||
|
||||
|
||||
==============================================================================
|
||||
LANG#CMAKE *SpaceVim-layers-lang-cmake*
|
||||
|
||||
This layer is for cmake development, disabled by default, to enable this
|
||||
layer, add following snippet to your SpaceVim configuration file.
|
||||
>
|
||||
[[layers]]
|
||||
name = 'lang#cmake'
|
||||
<
|
||||
|
||||
|
||||
==============================================================================
|
||||
LANG#COFFEESCRIPT *SpaceVim-layers-lang-coffeescript*
|
||||
|
||||
|
27
docs/cn/layers/lang/cmake.md
Normal file
27
docs/cn/layers/lang/cmake.md
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
title: "SpaceVim lang#cmake 模块"
|
||||
description: "这一模块为 cmake 脚本语言提供了语法高亮等功能。"
|
||||
lang: zh
|
||||
---
|
||||
|
||||
# [可用模块](../../) >> lang#cmake
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
- [模块简介](#模块简介)
|
||||
- [启用模块](#启用模块)
|
||||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
## 模块简介
|
||||
|
||||
这一模块为在 SpaceVim 中进行 cmake 开发提供了支持。
|
||||
|
||||
## 启用模块
|
||||
|
||||
可通过在配置文件内加入如下配置来启用该模块:
|
||||
|
||||
```toml
|
||||
[[layers]]
|
||||
name = "lang#cmake"
|
||||
```
|
31
docs/layers/lang/cmake.md
Normal file
31
docs/layers/lang/cmake.md
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
title: "SpaceVim lang#cmake layer"
|
||||
description: "This layer is for cmake script, provides syntax highlighting and language server protocol support."
|
||||
---
|
||||
|
||||
# [Available Layers](../../) >> lang#cmake
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
- [Description](#description)
|
||||
- [Install](#install)
|
||||
- [Features](#features)
|
||||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
## Description
|
||||
|
||||
`lang#cmake` layer provides syntax highlighting for cmake script.
|
||||
|
||||
## Install
|
||||
|
||||
This layer is not enabled by default.
|
||||
To use this configuration layer, update your custom configuration file with:
|
||||
|
||||
```toml
|
||||
[[layers]]
|
||||
name = "lang#cmake"
|
||||
```
|
||||
## Features
|
||||
|
||||
- syntax highlighting
|
Loading…
Reference in New Issue
Block a user