Migrate to lazy.nvim with more lua config

This commit is contained in:
Alexander Gehrke 2023-06-19 11:54:39 +02:00
parent d7aa29354c
commit be6559c1b6
28 changed files with 823 additions and 445 deletions

View file

@ -1,2 +0,0 @@
au! BufRead,BufNewFile *.atg setfiletype coco
au! BufRead,BufNewFile *.wili setfiletype wili

18
ftdetect/extensions.lua Normal file
View file

@ -0,0 +1,18 @@
vim.filetype.add({
extension = {
},
filename = {
['.scalafmt.conf'] = 'hocon',
['kitty.conf'] = 'kitty',
['neomuttrc'] = 'neomutt',
['template'] = 'sh',
},
pattern = {
['${XDG_CONFIG_HOME}/kitty/*.conf'] = 'kitty',
['${XDG_CONFIG_HOME}/kitty/*.session'] = 'kitty-session',
},
})
-- au BufRead,BufNewFile *.ttl set filetype=rdf-turtle
-- au! BufNewFile,BufRead *.xwiki set ft=xwiki syntax=xwiki
--

View file

@ -1 +0,0 @@
au! BufNewFile,BufRead .scalafmt.conf set ft=hocon syntax=hocon

View file

@ -1,8 +0,0 @@
au! BufNewFile,BufRead kitty.conf set ft=kitty syntax=kitty
if exists("$XDG_CONFIG_HOME")
au! BufNewFile,BufRead $XDG_CONFIG_HOME/kitty/*.conf set ft=kitty syntax=kitty
au! BufRead,BufNewFile $XDG_CONFIG_HOME/kitty/*.session set ft=kitty-session syntax=kitty-session
else
au! BufNewFile,BufRead ~/.config/kitty/*.conf set ft=kitty syntax=kitty
au! BufRead,BufNewFile ~/.config/kitty/*.session set ft=kitty-session syntax=kitty-session
endif

24
ftdetect/sc.lua Normal file
View file

@ -0,0 +1,24 @@
-- Override detection from lua/vim/filetype/detect.lua
-- removes match on |%w+| for SuperCollider
vim.filetype.add({
extension = {
-- This function checks the first 25 lines of file extension "sc" to resolve
-- detection between scala and SuperCollider
sc = function(path, bufnr)
for _, line in ipairs(vim.filetype.getlines(bufnr, 1, 25)) do
if
vim.filetype.findany(line, {
'var%s<',
'classvar%s<',
'%^this.*',
'%+%s%w*%s{',
'%*ar%s',
})
then
return 'supercollider'
end
end
return 'scala'
end
}
})

View file

@ -1 +0,0 @@
au! BufNewFile,BufRead *.sieve set ft=sieve syntax=sieve

View file

@ -1 +0,0 @@
au! BufRead,BufNewFile tolua_*.pkg set ft=tolua syntax=tolua

View file

@ -1,2 +0,0 @@
au! BufNewFile,BufRead *.xwiki set ft=xwiki syntax=xwiki