dotfiles/nvim/lua/config/options.lua

68 lines
1.7 KiB
Lua
Raw Permalink Normal View History

2023-08-19 20:39:11 +02:00
local g, opt = vim.g, vim.opt
2023-07-10 13:46:48 +02:00
2023-07-25 17:53:51 +02:00
2024-06-13 21:48:16 +02:00
g.mapleader = [[ ]] -- use space for leader
g.maplocalleader = [[\]] -- use backslash for local leader
2023-08-19 20:39:11 +02:00
-- Providers
g.loaded_python3_provider = 0
2024-06-13 21:48:16 +02:00
g.loaded_ruby_provider = 0
g.loaded_perl_provider = 0
g.loaded_node_provider = 0
2023-08-19 20:39:11 +02:00
2023-08-19 13:00:45 +02:00
-- General
2024-06-13 21:48:16 +02:00
opt.clipboard = 'unnamedplus' -- Use system clipboard
opt.swapfile = false -- Don't use swapfiles
opt.completeopt = 'menuone,noinsert,noselect' -- Completion behavior
opt.termguicolors = true
2023-07-10 13:46:48 +02:00
2023-08-19 13:00:45 +02:00
-- Indentation
2024-07-08 20:40:10 +02:00
opt.tabstop = 2 -- 1 tab = 2 spaces
2024-06-13 21:48:16 +02:00
opt.shiftwidth = 2 -- shift 2 spaces when tab
opt.smartindent = true -- autoindent new lines
opt.expandtab = false -- use spaces instead of tabs
2023-08-19 13:00:45 +02:00
2024-01-23 22:23:58 +01:00
-- UI
2024-06-13 21:48:16 +02:00
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 = '',
2023-07-23 01:34:24 +02:00
}
2023-08-19 13:00:45 +02:00
-- Additional filetypes
2023-11-15 21:39:37 +01:00
vim.filetype.add {
2024-06-13 21:48:16 +02:00
extension = {
mdx = 'mdx',
typ = 'typst',
purs = 'purescript',
nu = 'nu',
}
2023-11-15 21:39:37 +01:00
}
2024-07-08 20:40:10 +02:00
-- 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'
-- }
-- }