2024-03-13 14:07:20 -05:00
|
|
|
" Disable netrw for nvim-tree to work
|
2024-03-19 15:39:14 -05:00
|
|
|
let loaded_netrw = 1
|
|
|
|
let loaded_netrwPlugin = 1
|
2024-03-13 14:07:20 -05:00
|
|
|
|
|
|
|
" Turn on numbers
|
|
|
|
set number
|
|
|
|
|
|
|
|
" Turn off line wrapping
|
|
|
|
set nowrap
|
|
|
|
|
|
|
|
" Turn on syntax highlighting
|
|
|
|
syntax on
|
|
|
|
filetype plugin indent on
|
|
|
|
|
|
|
|
" Disable cmdline from bottom
|
|
|
|
set cmdheight=0
|
|
|
|
|
|
|
|
" Display as much of a line as possible instead of just showing @
|
|
|
|
set display+=lastline
|
|
|
|
|
2024-03-19 15:39:14 -05:00
|
|
|
" Ignore case while searching except when the search term contains capital
|
|
|
|
" letters
|
2024-03-13 14:07:20 -05:00
|
|
|
set ignorecase
|
|
|
|
set smartcase
|
|
|
|
|
|
|
|
" Use 4 spaces for tabs and properly adjust them for files using TAB
|
|
|
|
set tabstop=4
|
|
|
|
set shiftwidth=4
|
|
|
|
set expandtab
|
|
|
|
|
|
|
|
" Needed for group colors to work in nvim-tree
|
|
|
|
set termguicolors
|
|
|
|
|
|
|
|
" Show LSP signs in the number column
|
|
|
|
set signcolumn=number
|
|
|
|
|
|
|
|
" Turn on spell checking
|
|
|
|
set spell
|
|
|
|
|
|
|
|
" Enable mouse support
|
|
|
|
set mouse=n
|
|
|
|
|
2024-03-19 15:39:14 -05:00
|
|
|
" Enable automatic format on save, text change in normal mode and leaving
|
|
|
|
" insert mode
|
|
|
|
autocmd BufWritePre,TextChanged,InsertLeave <buffer> lua vim.lsp.buf.format()
|
|
|
|
|
2024-03-13 14:07:20 -05:00
|
|
|
" Set K to hover
|
|
|
|
command -nargs=+ LspHover lua vim.lsp.buf.hover()
|
|
|
|
set keywordprg=:LspHover
|
|
|
|
|
|
|
|
" Enable programming dictionary
|
|
|
|
set spelllang=en,programming
|
|
|
|
|
|
|
|
" Disable unused plugins
|
|
|
|
let g:loaded_perl_provider=0
|
|
|
|
let g:loaded_node_provider=0
|
|
|
|
let g:loaded_ruby_provider=0
|
|
|
|
|
2024-03-19 15:39:14 -05:00
|
|
|
" Change the leader to a comma
|
|
|
|
let mapleader = ","
|
|
|
|
let g:mapleader = ","
|
2024-03-13 14:07:20 -05:00
|
|
|
|
|
|
|
" Use ,dd for deleting without putting into buffer
|
|
|
|
nnoremap <leader>d "_d
|
|
|
|
nnoremap <leader>D "_D
|
|
|
|
nnoremap <leader>x "_x
|
|
|
|
vnoremap <leader>d "_d
|
|
|
|
|
|
|
|
" Insert a newline in normal mode by ,o
|
2024-03-19 15:39:14 -05:00
|
|
|
nnoremap <Leader>o o<Esc>k
|
|
|
|
nnoremap <Leader>O O<Esc>j
|
2024-03-13 14:07:20 -05:00
|
|
|
|
|
|
|
" Use ,u for redo
|
2024-03-19 15:39:14 -05:00
|
|
|
nnoremap <Leader>u <c-r>
|
2024-03-13 14:07:20 -05:00
|
|
|
|