Compare commits
6
Commits
dd484dd4ae
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92a41d8aad | ||
|
|
88f16fd877 | ||
|
|
99a9603b87 | ||
|
|
5723c9d3c2 | ||
|
|
1df73b0a74 | ||
|
|
b58be03795 |
No files matched your search
@@ -3,7 +3,7 @@
|
|||||||
- Install packages:
|
- Install packages:
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo pacman -S fd fzf neovim neovim-qt xclip xxhash
|
sudo pacman -S fd fzf neovim neovim-qt xclip xxhash wl-clipboard
|
||||||
```
|
```
|
||||||
|
|
||||||
- `mkdir ~/.config/nvim`
|
- `mkdir ~/.config/nvim`
|
||||||
|
|||||||
+25
-3
@@ -12,6 +12,12 @@ require('fzf-lua').setup({
|
|||||||
vertical = 'down:50%',
|
vertical = 'down:50%',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
keymap = {
|
||||||
|
fzf = {
|
||||||
|
["tab"] = "down",
|
||||||
|
["shift-tab"] = "up",
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Show titlestring in GUI window title
|
-- Show titlestring in GUI window title
|
||||||
@@ -43,9 +49,14 @@ vim.api.nvim_create_autocmd({ "BufReadPost", "BufNewFile" }, {
|
|||||||
if vim.bo.filetype ~= "make" then
|
if vim.bo.filetype ~= "make" then
|
||||||
vim.opt_local.expandtab = true
|
vim.opt_local.expandtab = true
|
||||||
end
|
end
|
||||||
vim.opt_local.ts = 4
|
local ft = vim.bo.filetype
|
||||||
vim.opt_local.sw = 4
|
local indent = 4
|
||||||
vim.opt_local.sts = 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"
|
vim.opt_local.cinoptions = ":0,g0"
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
@@ -97,3 +108,14 @@ vim.api.nvim_create_autocmd({ "FocusGained", "BufEnter" }, {
|
|||||||
})
|
})
|
||||||
|
|
||||||
vim.filetype.add({filename = {["Rsconscript"] = "ruby"}})
|
vim.filetype.add({filename = {["Rsconscript"] = "ruby"}})
|
||||||
|
|
||||||
|
-- Treat *.rs.erb files as eruby with an embedded Rust subtype
|
||||||
|
vim.filetype.add({
|
||||||
|
pattern = {
|
||||||
|
[".*%.rs%.erb"] = function(_, bufnr)
|
||||||
|
return "eruby", function()
|
||||||
|
vim.b[bufnr].eruby_subtype = "rust"
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
})
|
||||||
+21
-3
@@ -8,7 +8,11 @@ if exists("b:current_syntax")
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if !exists("b:propane_subtype")
|
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
|
endif
|
||||||
|
|
||||||
exe "syn include @propaneTarget syntax/".b:propane_subtype.".vim"
|
exe "syn include @propaneTarget syntax/".b:propane_subtype.".vim"
|
||||||
@@ -16,18 +20,32 @@ exe "syn include @propaneTarget syntax/".b:propane_subtype.".vim"
|
|||||||
syn region propaneTarget matchgroup=propaneDelimiter start="<<" end=">>$" contains=@propaneTarget keepend
|
syn region propaneTarget matchgroup=propaneDelimiter start="<<" end=">>$" contains=@propaneTarget keepend
|
||||||
|
|
||||||
syn match propaneComment "#.*"
|
syn match propaneComment "#.*"
|
||||||
syn match propaneOperator "->"
|
|
||||||
syn match propaneFieldAlias ":[a-zA-Z0-9_]\+" contains=propaneFieldOperator
|
syn match propaneFieldAlias ":[a-zA-Z0-9_]\+" contains=propaneFieldOperator
|
||||||
syn match propaneFieldOperator ":" contained
|
syn match propaneFieldOperator ":" contained
|
||||||
syn match propaneOperator "?"
|
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
|
" The right-hand side of a rule (after '->' up to '<<' or ';') lists symbol
|
||||||
|
" names that may coincide with propane keywords (e.g. 'start', 'token',
|
||||||
|
" 'tree'). Wrap it in a region that excludes keyword matches so those names
|
||||||
|
" are not highlighted as keywords. The '<<' is left unconsumed so the
|
||||||
|
" propaneTarget region can still match it.
|
||||||
|
syn region propaneRuleRhs matchgroup=propaneOperator start="->" end="\ze<<" end=";" contains=propaneFieldAlias,propaneRuleOperator,propaneComment keepend
|
||||||
|
syn match propaneRuleOperator "?" contained
|
||||||
|
" Keywords that introduce a user-defined name. The name is consumed by
|
||||||
|
" propaneName via nextgroup so a name matching a keyword (e.g. 'token start')
|
||||||
|
" is not highlighted as a keyword. These must be a match (not syn keyword)
|
||||||
|
" because a syn keyword always wins over a contained nextgroup match.
|
||||||
|
syn match propaneNameDecl "\<\%(tokenid\|token\|lex_fn\|module\|start\|tree_prefix\|tree_suffix\)\>" nextgroup=propaneName skipwhite
|
||||||
|
syn match propaneName "\<\h\w*\>" contained
|
||||||
|
syn match propaneKeyword "\<\%(context_user_fields\|drop\|free_token_node\|noline\|on_token_node\|prefix\|ptype\|token_user_fields\|tree\)\>"
|
||||||
|
|
||||||
syn region propaneRegex start="/" end="/" skip="\v\\\\|\\/"
|
syn region propaneRegex start="/" end="/" skip="\v\\\\|\\/"
|
||||||
|
|
||||||
hi def link propaneComment Comment
|
hi def link propaneComment Comment
|
||||||
hi def link propaneKeyword Keyword
|
hi def link propaneKeyword Keyword
|
||||||
|
hi def link propaneNameDecl Keyword
|
||||||
hi def link propaneRegex String
|
hi def link propaneRegex String
|
||||||
hi def link propaneOperator Operator
|
hi def link propaneOperator Operator
|
||||||
|
hi def link propaneRuleOperator Operator
|
||||||
hi def link propaneFieldOperator Operator
|
hi def link propaneFieldOperator Operator
|
||||||
hi def link propaneDelimiter Delimiter
|
hi def link propaneDelimiter Delimiter
|
||||||
hi def link propaneFieldAlias Identifier
|
hi def link propaneFieldAlias Identifier
|
||||||
Reference in new issue
Block a user