mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-26 05:04:34 +00:00
Add firenvim (nvim in browser) plugin
This commit is contained in:
parent
f6c0441810
commit
4eee9b4398
|
@ -57,6 +57,11 @@ local plugin_list = {
|
|||
after = "fzf",
|
||||
requires = { "stsewd/fzf-checkout.vim", opt = true },
|
||||
},
|
||||
{
|
||||
'glacambre/firenvim',
|
||||
config = get_plugin_file("firenvim.lua"),
|
||||
run = function() vim.fn['firenvim#install'](0) end
|
||||
},
|
||||
-- {
|
||||
-- "neovim/nvim-lspconfig",
|
||||
-- "williamboman/nvim-lsp-installer",
|
||||
|
|
27
home/.config/nvim/lua/plugins/settings/firenvim.lua
Normal file
27
home/.config/nvim/lua/plugins/settings/firenvim.lua
Normal file
|
@ -0,0 +1,27 @@
|
|||
local vim = require("vim")
|
||||
local cmd = vim.cmd
|
||||
local g = vim.g
|
||||
|
||||
-- Detect filetype based on filename for certain websites
|
||||
cmd[[
|
||||
autocmd BufEnter github.com_*.txt set filetype=markdown
|
||||
autocmd BufEnter txti.es_*.txt set filetype=typescript
|
||||
]]
|
||||
|
||||
-- Define firenvim configuration
|
||||
g.firenvim_config = {
|
||||
globalSettings = { alt="all" },
|
||||
localSettings = {
|
||||
[".*"] = {
|
||||
cmdline = "neovim",
|
||||
content = "text",
|
||||
priority = 0,
|
||||
selector = "textarea",
|
||||
-- Don't automatically take over, require the shortcut
|
||||
takeover = "never",
|
||||
},
|
||||
-- Enable automatic takeover on certain websites where it makes sense
|
||||
["https?://github.com"] = { takeover = "always", priority=1 },
|
||||
["https?://txti.es"] = { takeover = "always", priority = 1 },
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue