this repo has no description

.config/nvim: clean custom filetypes a little

+17 -46
+3
private_dot_config/nvim/after/syntax/massren.vim
··· 1 + syntax clear 2 + syntax match massrenComment "^\/\/.*$" 3 + highlight link massrenComment Comment
+13
private_dot_config/nvim/filetype.lua
··· 1 + print("Loaded filetype.lua") 2 + 3 + vim.filetype.add({ 4 + pattern = { 5 + [vim.fn.expand("~") .. "/.config/massren/temp/.*"] = "massren", 6 + [".env.*"] = "dotenv", 7 + }, 8 + 9 + extension = { 10 + jenkinsfile = "groovy", 11 + txtar = "txtar", 12 + }, 13 + })
-13
private_dot_config/nvim/ftdetect/massren.lua
··· 1 - vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { 2 - pattern = vim.fn.expand("~") .. "/.config/massren/temp/*", 3 - callback = function() 4 - vim.bo.filetype = "massren" 5 - vim.bo.commentstring = "// %s" 6 - 7 - vim.cmd([[ 8 - syntax clear 9 - syntax match massrenComment "^\/\/.*$" 10 - highlight link massrenComment Comment 11 - ]]) 12 - end, 13 - })
+1 -33
private_dot_config/nvim/init.lua
··· 43 43 vim.o.ignorecase = true 44 44 vim.o.smartcase = true 45 45 vim.o.splitkeep = "screen" 46 + vim.o.filetype = "on" 46 47 47 48 vim.g.loaded_netrw = 1 48 49 vim.g.loaded_netrwPlugin = 1 ··· 94 95 vim.cmd("wincmd =") 95 96 end, 96 97 }) 97 - 98 - local function setup_qute_tab_edit() 99 - local ft_name = "qute-tab-edit" 100 - 101 - vim.filetype.add({ 102 - extension = { 103 - ["qute-tab-edit"] = ft_name, 104 - }, 105 - filename = { 106 - ["qute-tab-edit"] = ft_name, 107 - }, 108 - }) 109 - 110 - vim.api.nvim_set_hl(0, "QuteTabIndex", { link = "Number" }) 111 - vim.api.nvim_set_hl(0, "QuteTabTitle", { fg = "#98c379", bold = true }) 112 - vim.api.nvim_set_hl(0, "QuteTabURL", { link = "Underlined" }) 113 - 114 - -- Create FileType autocmd 115 - vim.api.nvim_create_autocmd("FileType", { 116 - pattern = ft_name, 117 - callback = function() 118 - vim.api.nvim_command("syntax clear") 119 - 120 - vim.api.nvim_command("syntax match QuteTabIndex '^\\d\\+:'") 121 - vim.api.nvim_command("syntax match QuteTabTitle ':\\s\\+\\zs.\\{-}\\ze\\s\\+(https\\?://.*)'") 122 - vim.api.nvim_command("syntax match QuteTabURL '(https\\?://[^)]*)'") 123 - 124 - vim.b.current_syntax = ft_name 125 - end, 126 - }) 127 - end 128 - 129 - setup_qute_tab_edit()