mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 22:59:15 +00:00
ditch fennel ? (#3)
yes Reviewed-on: https://git.earth2077.fr/leana/.files/pulls/3 Co-authored-by: Léana 江 <leana.jiang@icloud.com> Co-committed-by: Léana 江 <leana.jiang@icloud.com>
This commit is contained in:
parent
d0cb07df6d
commit
b81732fcf2
41 changed files with 1370 additions and 1114 deletions
47
.config/nvim/lua/opts/init.lua
Normal file
47
.config/nvim/lua/opts/init.lua
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
local opt = vim.opt
|
||||
|
||||
opt.hlsearch = false
|
||||
opt.incsearch = true
|
||||
|
||||
opt.number = true
|
||||
opt.relativenumber = true
|
||||
opt.cursorline = true
|
||||
opt.signcolumn = "yes"
|
||||
|
||||
opt.tabstop = 4
|
||||
opt.expandtab = true
|
||||
opt.shiftwidth = 4
|
||||
|
||||
opt.wrap = false -- Slows the editor
|
||||
opt.linebreak = true
|
||||
opt.breakindent = true
|
||||
opt.filetype = "on"
|
||||
|
||||
opt.swapfile = false
|
||||
opt.backup = false
|
||||
opt.undofile = true
|
||||
|
||||
opt.termguicolors = true
|
||||
opt.mouse = "a"
|
||||
|
||||
opt.ignorecase = true
|
||||
opt.smartcase = true
|
||||
opt.autoindent = true
|
||||
opt.smartindent = true
|
||||
|
||||
opt.scrolloff = 3
|
||||
|
||||
opt.colorcolumn = "80"
|
||||
|
||||
opt.foldlevel = 99
|
||||
opt.foldlevelstart = 99
|
||||
opt.foldenable = true
|
||||
|
||||
opt.winbar = "%{%v:lua.require'opts.winbar'.eval()%}"
|
||||
|
||||
opt.showmode = false
|
||||
|
||||
opt.listchars = { tab = "│ ", trail = "␣" }
|
||||
opt.list = true
|
||||
|
||||
vim.g.netrw_banner = 0
|
||||
36
.config/nvim/lua/opts/winbar.lua
Normal file
36
.config/nvim/lua/opts/winbar.lua
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
local M = {}
|
||||
|
||||
local api = vim.api
|
||||
local fn = vim.fn
|
||||
|
||||
api.nvim_set_hl(0, "WinBar", { fg = "#dedede" })
|
||||
api.nvim_set_hl(0, "WinBarPath", { bg = "#dedede" })
|
||||
api.nvim_set_hl(0, "WinBarModified", { bg = "#dedede", bold = true })
|
||||
|
||||
function M.eval()
|
||||
local buffer = api.nvim_win_get_buf(0)
|
||||
local bufname = fn.bufname(buffer)
|
||||
local modified = ""
|
||||
local readonly = ""
|
||||
|
||||
if vim.bo[buffer].readonly then
|
||||
readonly = "[RO] "
|
||||
end
|
||||
|
||||
if vim.bo[buffer].modified then
|
||||
modified = "[+] "
|
||||
end
|
||||
|
||||
bufname = fn.fnamemodify(bufname, ":p:~")
|
||||
|
||||
return "%="
|
||||
.. "%#WinBarModified#"
|
||||
.. readonly
|
||||
.. modified
|
||||
.. "%*"
|
||||
.. "%#WinBarPath#"
|
||||
.. bufname
|
||||
.. "%*"
|
||||
end
|
||||
|
||||
return M
|
||||
Loading…
Add table
Add a link
Reference in a new issue