diff options
Diffstat (limited to '.config/nvim')
| -rw-r--r-- | .config/nvim/ftdetect/hobbylang.vim | 2 | ||||
| -rw-r--r-- | .config/nvim/lua/map.lua | 6 | ||||
| -rw-r--r-- | .config/nvim/syntax/hobbylang.vim | 13 |
3 files changed, 12 insertions, 9 deletions
diff --git a/.config/nvim/ftdetect/hobbylang.vim b/.config/nvim/ftdetect/hobbylang.vim index 263edde..ea320c0 100644 --- a/.config/nvim/ftdetect/hobbylang.vim +++ b/.config/nvim/ftdetect/hobbylang.vim @@ -1 +1 @@ -au BufNewFile,BufRead *.hl set filetype=hobbylang +au BufNewFile,BufRead *.hs set filetype=hobbylang diff --git a/.config/nvim/lua/map.lua b/.config/nvim/lua/map.lua index ef97bd1..2ae706b 100644 --- a/.config/nvim/lua/map.lua +++ b/.config/nvim/lua/map.lua @@ -25,9 +25,9 @@ vim.keymap.set(nv, "<C-l>", "<C-w>l", {}) -- Same, but for terminal vim.keymap.set("t", "<C-h>", "<C-\\><C-n><C-w>h", {}) -vim.keymap.set("t", "<C-j>", "<C-\\><C-n><C-w>j", {}) -vim.keymap.set("t", "<C-k>", "<C-\\><C-n><C-w>k", {}) -vim.keymap.set("t", "<C-l>", "<C-\\><C-n><C-w>l", {}) +vim.keymap.set("t", "<C-t>", "<C-\\><C-n><C-w>j", {}) +vim.keymap.set("t", "<C-n>", "<C-\\><C-n><C-w>k", {}) +vim.keymap.set("t", "<C-s>", "<C-\\><C-n><C-w>l", {}) -- Moving windows vim.keymap.set(nv, "<C-w>h", "<C-w>H", {}) diff --git a/.config/nvim/syntax/hobbylang.vim b/.config/nvim/syntax/hobbylang.vim index e1953d0..cb02b5b 100644 --- a/.config/nvim/syntax/hobbylang.vim +++ b/.config/nvim/syntax/hobbylang.vim @@ -3,11 +3,11 @@ if exists("b:current_syntax") endif syn keyword hlStatement break continue return self -syn keyword hlLabel case default +syn keyword hlLabel case syn keyword hlConditional if else match syn keyword hlRepeat while loop for syn keyword hlStructure struct enum var func -syn keyword hlModifier static +syn keyword hlModifier static global syn keyword hlLiteral true false nil syn match hlFunction /\<\h\w*\ze\_s*(/ @@ -16,11 +16,14 @@ syn match hlComment /\/\/.*/ syn match hlType /[^a-z0-9_][A-Z][A-z0-9_]*/ syn match hlNumber /\<\d\+\>/ syn match hlNumber /\<\d\+\.\d*/ -syn match hlOperator /=|\+=|-=|\*=|\/=|%=|\*\*=|\+|-|\*\*|\*|\/|%|<|>|<=|>=|==|!=|!|\.\./ +syn match hlOperator /=|\+=|-=|\*=|\/=|%=|\*\*=|\+|-|\*\*|\*|\/|%|\<|\>|\<=|\>=|==|!=|!|\.\./ -syn region hlString start="\"" end="\"" -syn region hlString start="'" end="'" +syn region hlString start="\"" end="\"" contains=hlEscape +syn region hlString start="'" end="'" contains=hlEscape +syn match hlEscape /\\[ntra"'\\]/ + +hi def link hlEscape Special hi def link hlStructure Structure hi def link hlFunction Function hi def link hlStatement Statement |
