Will rewrite my neovim config
This commit is contained in:
parent
657fecfa64
commit
686bdd12c4
23 changed files with 591 additions and 176 deletions
dotfiles/neovim/lua/my
|
@ -3,43 +3,41 @@ local helpers = require("my.helpers")
|
|||
local M = {}
|
||||
|
||||
function M.setup()
|
||||
local opt = vim.opt -- to set options
|
||||
|
||||
-- Disable filetype.vim
|
||||
vim.g.do_filetype_lua = true
|
||||
vim.g.did_load_filetypes = false
|
||||
|
||||
-- Basic options
|
||||
opt.joinspaces = false -- No double spaces with join
|
||||
opt.list = true -- Show some invisible characters
|
||||
opt.cmdheight = 0 -- Hide command line when it's not getting used
|
||||
vim.opt.joinspaces = false -- No double spaces with join
|
||||
vim.opt.list = true -- Show some invisible characters
|
||||
vim.opt.cmdheight = 0 -- Hide command line when it's not getting used
|
||||
|
||||
-- Line numbers
|
||||
opt.number = true -- Show line numbers
|
||||
opt.relativenumber = true -- Relative line numbers
|
||||
vim.opt.number = true -- Show line numbers
|
||||
vim.opt.relativenumber = true -- Relative line numbers
|
||||
|
||||
-- TODO: only do this for specific filestypes
|
||||
opt.expandtab = true -- Use spaces for the tab char
|
||||
vim.opt.expandtab = true -- Use spaces for the tab char
|
||||
|
||||
opt.scrolloff = 4 -- Lines of context
|
||||
opt.shiftround = true -- Round indent
|
||||
opt.shiftwidth = 2 -- Size of an indent
|
||||
opt.termguicolors = true -- True color support
|
||||
vim.opt.scrolloff = 4 -- Lines of context
|
||||
vim.opt.shiftround = true -- Round indent
|
||||
vim.opt.shiftwidth = 2 -- Size of an indent
|
||||
vim.opt.termguicolors = true -- True color support
|
||||
|
||||
opt.ignorecase = true -- Ignore case
|
||||
opt.smartcase = true -- Do not ignore case with capitals
|
||||
vim.opt.ignorecase = true -- Ignore case
|
||||
vim.opt.smartcase = true -- Do not ignore case with capitals
|
||||
|
||||
opt.smartindent = true -- Insert indents automatically
|
||||
vim.opt.smartindent = true -- Insert indents automatically
|
||||
|
||||
opt.splitbelow = true -- Put new windows below current
|
||||
opt.splitright = true -- Put new windows right of current
|
||||
vim.opt.splitbelow = true -- Put new windows below current
|
||||
vim.opt.splitright = true -- Put new windows right of current
|
||||
|
||||
opt.wrap = false -- Disable line wrap (by default)
|
||||
opt.wildmode = { 'list', 'longest' } -- Command-line completion mode
|
||||
opt.completeopt = { "menu", "menuone", "noselect" }
|
||||
vim.opt.wrap = false -- Disable line wrap (by default)
|
||||
vim.opt.wildmode = { 'list', 'longest' } -- Command-line completion mode
|
||||
vim.opt.completeopt = { "menu", "menuone", "noselect" }
|
||||
|
||||
-- Set leader
|
||||
helpers.global("mapleader", " ")
|
||||
vim.g.mapleader = " "
|
||||
|
||||
-- Import other options
|
||||
require("my.options.folding").setup()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue