Add firenvim (nvim in browser) plugin

This commit is contained in:
ItsDrike 2021-12-08 22:34:30 +01:00
parent f6c0441810
commit 4eee9b4398
No known key found for this signature in database
GPG key ID: FB8CA11A2CF3A843
2 changed files with 32 additions and 0 deletions

View file

@ -57,6 +57,11 @@ local plugin_list = {
after = "fzf", after = "fzf",
requires = { "stsewd/fzf-checkout.vim", opt = true }, 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", -- "neovim/nvim-lspconfig",
-- "williamboman/nvim-lsp-installer", -- "williamboman/nvim-lsp-installer",

View 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 },
}
}