Compare commits

...

2 Commits

2 changed files with 14 additions and 5 deletions

View File

@ -43,9 +43,14 @@ vim.api.nvim_create_autocmd({ "BufReadPost", "BufNewFile" }, {
if vim.bo.filetype ~= "make" then
vim.opt_local.expandtab = true
end
vim.opt_local.ts = 4
vim.opt_local.sw = 4
vim.opt_local.sts = 4
local ft = vim.bo.filetype
local indent = 4
if ft == "ruby" or ft == "html" or ft == "xml" then
indent = 2
end
vim.opt_local.ts = indent
vim.opt_local.sw = indent
vim.opt_local.sts = indent
vim.opt_local.cinoptions = ":0,g0"
end)
end,

View File

@ -8,7 +8,11 @@ if exists("b:current_syntax")
endif
if !exists("b:propane_subtype")
let b:propane_subtype = "d"
if search('\<import\s\+\%(std\|core\)\.', 'nw') > 0
let b:propane_subtype = "d"
else
let b:propane_subtype = "cpp"
endif
endif
exe "syn include @propaneTarget syntax/".b:propane_subtype.".vim"
@ -20,7 +24,7 @@ syn match propaneOperator "->"
syn match propaneFieldAlias ":[a-zA-Z0-9_]\+" contains=propaneFieldOperator
syn match propaneFieldOperator ":" contained
syn match propaneOperator "?"
syn keyword propaneKeyword drop free_token_node free_token_user_fields module prefix ptype start token token_user_fields tokenid tree tree_prefix tree_suffix
syn keyword propaneKeyword context_user_fields drop free_token_node lex_fn module noline on_token_node prefix ptype start token token_user_fields tokenid tree tree_prefix tree_suffix
syn region propaneRegex start="/" end="/" skip="\v\\\\|\\/"