.config/nvim/lua/config/options.lua

Sun, 12 Feb 2023 14:42:31 -0600

author
Meredith Howard <mhoward@roomag.org>
date
Sun, 12 Feb 2023 14:42:31 -0600
changeset 1014
b57969db48db
child 1015
21950cadff6b
permissions
-rw-r--r--

start nvim config

vim.g.mapleader = "\\"
vim.g.maplocalleader = "\\"

local o = vim.opt

-- Editing
o.expandtab = true
o.shiftround = true
o.shiftwidth = 2

-- Display
o.breakindent = true
o.breakindentopt = "min:66,shift:2"
o.diffopt:append("algorithm:patience")
o.fillchars = "fold: ,vert:│"
o.linebreak = true
o.listchars = "tab:⇥·,trail:◼,nbsp:◻,extends:»,precedes:«"
o.showbreak = "» "
o.termguicolors = true
o.signcolumn = "number"

-- set font etc
if vim.fn.has("gui") then
  o.number = true
end

-- Behavior
o.autowriteall = true
o.ignorecase = true
o.scrolloff = 15
o.sidescrolloff = 10
o.smartcase = true
o.splitbelow = true
o.splitright = true
o.wildignorecase = true

-- Paths
o.tags:append(".tags,./.tags;")
o.wildignore = "*~,*.o,*.pyc,.git/*,hg/*,.svn/*"

vim.api.nvim_create_autocmd("LspAttach", {
  once = true,
  callback = function(args)
    vim.opt.number = true
  end,
})

mercurial