dotfiles/nvim/lua/config/options.lua
2024-07-08 20:40:10 +02:00

68 lines
1.7 KiB
Lua

local g, opt = vim.g, vim.opt
g.mapleader = [[ ]] -- use space for leader
g.maplocalleader = [[\]] -- use backslash for local leader
-- Providers
g.loaded_python3_provider = 0
g.loaded_ruby_provider = 0
g.loaded_perl_provider = 0
g.loaded_node_provider = 0
-- General
opt.clipboard = 'unnamedplus' -- Use system clipboard
opt.swapfile = false -- Don't use swapfiles
opt.completeopt = 'menuone,noinsert,noselect' -- Completion behavior
opt.termguicolors = true
-- Indentation
opt.tabstop = 2 -- 1 tab = 2 spaces
opt.shiftwidth = 2 -- shift 2 spaces when tab
opt.smartindent = true -- autoindent new lines
opt.expandtab = false -- use spaces instead of tabs
-- UI
opt.number = true -- Show current line number
opt.relativenumber = true -- Show relative line numbers
opt.colorcolumn = '80' -- Show soft char limit
opt.list = true -- Show punctuation
opt.listchars = { -- Punctuation marks
trail = '·',
nbsp = '',
tab = '',
leadmultispace = '│·',
extends = '',
precedes = '',
}
-- Additional filetypes
vim.filetype.add {
extension = {
mdx = 'mdx',
typ = 'typst',
purs = 'purescript',
nu = 'nu',
}
}
-- vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
-- vim.lsp.handlers.hover,
-- {
-- border = 'rounded'
-- }
-- )
--
-- vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(
-- vim.lsp.handlers.signature_help,
-- {
-- border = 'rounded'
-- }
-- )
--
-- vim.diagnostic.config {
-- float = {
-- border = 'rounded'
-- }
-- }