2022-09-05 02:18:34 +02:00
|
|
|
if not vim.g.started_by_firenvim then
|
|
|
|
local sockdir = (vim.env['XDG_RUNTIME_DIR']
|
|
|
|
or vim.env['XDG_STATE_HOME'] or vim.env['HOME'] .. '/.local/state')
|
|
|
|
vim.fn.mkdir(sockdir, 'p')
|
|
|
|
if vim.fn.filereadable(sockdir .. '/nvim.sock') == 0 then
|
|
|
|
vim.fn.serverstart(sockdir .. '/nvim.sock');
|
|
|
|
end
|
|
|
|
else
|
2022-08-15 01:29:31 +02:00
|
|
|
vim.g.firenvim_config = {
|
|
|
|
localSettings = {
|
|
|
|
[".*"] = {
|
|
|
|
priority = 0,
|
|
|
|
takeover = 'never',
|
2022-11-13 10:31:15 +01:00
|
|
|
}
|
2022-08-12 03:33:18 +02:00
|
|
|
}
|
2022-08-15 01:29:31 +02:00
|
|
|
}
|
2022-08-12 03:33:18 +02:00
|
|
|
|
2022-08-15 03:19:05 +02:00
|
|
|
vim.o.wrap = true
|
|
|
|
vim.o.guifont = 'Source_Code_Pro:h10'
|
|
|
|
vim.o.textwidth = 0
|
2022-08-12 03:33:18 +02:00
|
|
|
|
2022-08-17 19:13:25 +02:00
|
|
|
local fv_fileprefix = vim.env['XDG_RUNTIME_DIR'] .. '/firenvim/'
|
2022-08-15 01:29:31 +02:00
|
|
|
vim.api.nvim_create_augroup('firenvim', { clear = true })
|
2022-08-18 01:16:57 +02:00
|
|
|
vim.api.nvim_create_autocmd({ 'BufEnter' }, {
|
|
|
|
group = 'firenvim',
|
|
|
|
pattern = {
|
2022-08-21 21:13:37 +02:00
|
|
|
fv_fileprefix .. 'schlomp.space_*',
|
|
|
|
fv_fileprefix .. 'codeberg.org_*',
|
|
|
|
fv_fileprefix .. 'gitlab.com_*',
|
|
|
|
fv_fileprefix .. 'github.com_*',
|
|
|
|
fv_fileprefix .. 'very.tastytea.de_*',
|
|
|
|
fv_fileprefix .. 'bookwyrm.social_*',
|
|
|
|
fv_fileprefix .. 'openlibrary.org_*',
|
|
|
|
fv_fileprefix .. 'bugs.gentoo.org_*',
|
2022-08-18 01:16:57 +02:00
|
|
|
},
|
|
|
|
command = [[set filetype=markdown | set tw=0]]
|
|
|
|
})
|
2022-09-06 18:14:31 +02:00
|
|
|
vim.api.nvim_create_autocmd({ 'BufEnter' }, {
|
|
|
|
group = 'firenvim',
|
|
|
|
pattern = {
|
|
|
|
fv_fileprefix .. 'wiki.gentoo.org_*',
|
|
|
|
fv_fileprefix .. '*.wikipedia.org_*',
|
|
|
|
},
|
|
|
|
command = [[set filetype=mediawiki | set tw=0]]
|
|
|
|
})
|
2022-08-15 01:29:31 +02:00
|
|
|
end
|