firenvim
This commit is contained in:
parent
3a524bc43d
commit
25c43ed3a7
|
@ -49,7 +49,7 @@ opt.incsearch = true -- Incremental search
|
||||||
|
|
||||||
opt.wrap = false -- No wrap by default
|
opt.wrap = false -- No wrap by default
|
||||||
opt.linebreak = true -- Break long lines at 'breakat'
|
opt.linebreak = true -- Break long lines at 'breakat'
|
||||||
opt.breakat = '\\ \\ ;:,!?' -- Long lines break chars
|
opt.breakat = "\\ \\ ;:,!?" -- Long lines break chars
|
||||||
opt.startofline = false -- Cursor in same column for few commands
|
opt.startofline = false -- Cursor in same column for few commands
|
||||||
opt.splitbelow = true -- Splits open bottom right
|
opt.splitbelow = true -- Splits open bottom right
|
||||||
opt.splitright = true
|
opt.splitright = true
|
||||||
|
@ -59,12 +59,13 @@ opt.formatoptions = "qnlmBjp" -- see :h fo-table & :h formatoptions
|
||||||
-- Diff
|
-- Diff
|
||||||
-- ===
|
-- ===
|
||||||
|
|
||||||
opt.diffopt:append({ 'iwhite', 'indent-heuristic', 'algorithm:patience' })
|
opt.diffopt:append { "iwhite", "indent-heuristic", "algorithm:patience" }
|
||||||
opt.wildmode = 'longest:full,full' -- Command-line completion mode
|
opt.wildmode = "longest:full,full" -- Command-line completion mode
|
||||||
|
|
||||||
-- Editor UI
|
-- Editor UI
|
||||||
-- ===
|
-- ===
|
||||||
|
|
||||||
|
vim.o.guifont = "FiraCode Nerd Font:h15"
|
||||||
opt.termguicolors = true
|
opt.termguicolors = true
|
||||||
opt.shortmess = "xsTOInfFitloCaAs"
|
opt.shortmess = "xsTOInfFitloCaAs"
|
||||||
opt.showmode = true -- Show mode in cmd window
|
opt.showmode = true -- Show mode in cmd window
|
||||||
|
@ -80,7 +81,7 @@ if vim.g.started_by_firenvim == false then
|
||||||
opt.laststatus = 3 -- Always show laststatus
|
opt.laststatus = 3 -- Always show laststatus
|
||||||
else
|
else
|
||||||
opt.showtabline = 1 -- Don't show tabline in firenvim, unless multitab
|
opt.showtabline = 1 -- Don't show tabline in firenvim, unless multitab
|
||||||
opt.laststatus = 3 -- Don't show laststatus in firenvim
|
opt.laststatus = 1 -- Don't show laststatus in firenvim
|
||||||
end
|
end
|
||||||
opt.helpheight = 0 -- Disable help window resizing
|
opt.helpheight = 0 -- Disable help window resizing
|
||||||
opt.winwidth = 30 -- Minimum width for active window
|
opt.winwidth = 30 -- Minimum width for active window
|
||||||
|
@ -92,16 +93,15 @@ opt.showcmd = false -- show command in status line
|
||||||
opt.cmdheight = 0
|
opt.cmdheight = 0
|
||||||
opt.cmdwinheight = 5 -- Command-line lines
|
opt.cmdwinheight = 5 -- Command-line lines
|
||||||
opt.equalalways = true -- Resize windows on split or close
|
opt.equalalways = true -- Resize windows on split or close
|
||||||
opt.colorcolumn = '+0' -- Column highlight at textwidth's max character-limit
|
opt.colorcolumn = "+0" -- Column highlight at textwidth's max character-limit
|
||||||
|
|
||||||
opt.cursorline = true
|
opt.cursorline = true
|
||||||
opt.cursorlineopt = { 'number', 'screenline' }
|
opt.cursorlineopt = { "number", "screenline" }
|
||||||
|
|
||||||
opt.pumheight = 10 -- Maximum number of items to show in the popup menu
|
opt.pumheight = 10 -- Maximum number of items to show in the popup menu
|
||||||
opt.pumwidth = 10 -- Minimum width for the popup menu
|
opt.pumwidth = 10 -- Minimum width for the popup menu
|
||||||
opt.pumblend = 10 -- Popup blend
|
opt.pumblend = 10 -- Popup blend
|
||||||
|
|
||||||
|
|
||||||
-- autocommands
|
-- autocommands
|
||||||
-- ===
|
-- ===
|
||||||
local function augroup(name)
|
local function augroup(name)
|
||||||
|
@ -117,28 +117,38 @@ vim.api.nvim_create_autocmd("TextYankPost", {
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Disable conceallevel for specific file-types.
|
-- Disable conceallevel for specific file-types.
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
group = augroup('fix_conceallevel'),
|
group = augroup "fix_conceallevel",
|
||||||
pattern = { 'latex', 'tex' },
|
pattern = { "latex", "tex" },
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.opt_local.conceallevel = 0
|
vim.opt_local.conceallevel = 0
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Resize splits if window got resized
|
-- Resize splits if window got resized
|
||||||
vim.api.nvim_create_autocmd('VimResized', {
|
vim.api.nvim_create_autocmd("VimResized", {
|
||||||
group = augroup('resize_splits'),
|
group = augroup "resize_splits",
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.cmd('wincmd =')
|
vim.cmd "wincmd ="
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Wrap and enable spell-checker in text filetypes
|
-- Wrap and enable spell-checker in text filetypes
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
group = augroup('spell_conceal'),
|
group = augroup "spell_conceal",
|
||||||
pattern = { 'gitcommit', 'markdown', 'tex', 'latex', 'norg' },
|
pattern = { "gitcommit", "markdown", "tex", "latex", "norg" },
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.opt_local.spell = true
|
vim.opt_local.spell = true
|
||||||
vim.opt_local.conceallevel = 0
|
vim.opt_local.conceallevel = 0
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- map resizing for firenvim
|
||||||
|
if vim.g.started_by_firenvim == true then
|
||||||
|
vim.keymap.set("n", "<leader><C-DOWN>", function()
|
||||||
|
vim.o.lines = vim.o.lines + 1
|
||||||
|
end, { expr = true, desc = "Make Display bigger" })
|
||||||
|
vim.keymap.set("n", "<leader><C-UP>", function()
|
||||||
|
vim.o.lines = vim.o.lines - 1
|
||||||
|
end, { expr = true, desc = "Make Display smaller" })
|
||||||
|
end
|
||||||
|
|
|
@ -310,6 +310,7 @@ local plugins = {
|
||||||
-- lazy.nvim
|
-- lazy.nvim
|
||||||
{
|
{
|
||||||
"folke/noice.nvim",
|
"folke/noice.nvim",
|
||||||
|
enabled = not vim.g.started_by_firenvim,
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = {
|
opts = {
|
||||||
-- add any options here
|
-- add any options here
|
||||||
|
@ -330,6 +331,7 @@ local plugins = {
|
||||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||||
["vim.lsp.util.stylize_markdown"] = true,
|
["vim.lsp.util.stylize_markdown"] = true,
|
||||||
["cmp.entry.get_documentation"] = true,
|
["cmp.entry.get_documentation"] = true,
|
||||||
|
["hover.enabled"] = false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- you can enable a preset for easier configuration
|
-- you can enable a preset for easier configuration
|
||||||
|
@ -458,6 +460,24 @@ local plugins = {
|
||||||
opacity = 10,
|
opacity = 10,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"glacambre/firenvim",
|
||||||
|
lazy = not vim.g.started_by_firenvim,
|
||||||
|
build = function()
|
||||||
|
vim.fn["firenvim#install"](0)
|
||||||
|
end,
|
||||||
|
config = function()
|
||||||
|
vim.g.firenvim_config = {
|
||||||
|
localSettings = {
|
||||||
|
[".*"] = {
|
||||||
|
filename = "/tmp/{hostname}_{pathname%10}.{extension%5}",
|
||||||
|
cmdline = "firenvim",
|
||||||
|
takeover = "never", -- activate manually (<C-e>)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
return plugins
|
return plugins
|
||||||
|
|
Loading…
Reference in New Issue