nvim: Add function to disable line numbering.

This commit is contained in:
raute 2023-12-01 16:45:06 +01:00
parent 6f0ac0e75e
commit 1bac8ab0ed
1 changed files with 11 additions and 3 deletions

View File

@ -4,9 +4,17 @@ vim.env.SHELL = "/bin/bash"
-- disable mouse
vim.opt.mouse = ""
-- line numbering
vim.opt.number = true
vim.opt.relativenumber = true
vim.g.linenumbers = true
vim.opt.number = vim.g.linenumbers
vim.opt.relativenumber = vim.g.linenumbers
function toggle_line_numbering()
vim.g.linenumbers = not vim.g.linenumbers
vim.opt.number = vim.g.linenumbers
vim.opt.relativenumber = vim.g.linenumbers
end
vim.keymap.set("n", "ä", ":lua toggle_line_numbering()<CR>")
vim.opt.encoding = "utf-8"
vim.opt.fileencoding = "utf-8"