nix/common/nvim.lua

65 lines
1.2 KiB
Lua
Raw Normal View History

2022-07-25 14:59:32 +00:00
local opt = vim.opt
local g = vim.g
vim.cmd [[
2022-08-07 15:46:39 +00:00
colorscheme onehalflight
2022-08-01 21:11:10 +00:00
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
2022-08-07 13:23:23 +00:00
autocmd Filetype json
\ let g:indentLine_setConceal = 0 |
\ let g:vim_json_syntax_conceal = 0
2022-07-25 14:59:32 +00:00
]]
g.mapleader = ' '
opt.undofile = true
opt.undodir = "/home/sijmen/.cache/nvim/undo"
opt.backupdir = "/home/sijmen/.cache/nvim/backup"
2022-08-01 21:11:10 +00:00
opt.shada = "!,'100,<50,s10,h"
2022-07-25 14:59:32 +00:00
opt.smartindent = true
opt.autoindent = true
opt.tabstop = 2
opt.shiftwidth = 2
opt.expandtab = true
opt.mouse = "a"
opt.termguicolors = true
opt.cursorline = true
opt.relativenumber = true
opt.viminfo = ""
opt.viminfofile = "NONE"
opt.smartcase = true
opt.ttimeoutlen = 5
opt.compatible = false
opt.autoread = true
opt.incsearch = true
opt.hidden = true
opt.shortmess = "atI"
2022-08-01 21:11:10 +00:00
2022-07-25 14:59:32 +00:00
require("nvim-tree").setup()
require("nvim-treesitter.configs").setup {
auto_install = true,
highlight = {
enable = true,
},
}
local lspconfig = require("lspconfig")
2022-08-01 21:11:10 +00:00
lspconfig.rnix.setup {}
lspconfig.pyright.setup {}
require("rust-tools").setup {}
2022-08-05 11:29:18 +00:00
vim.api.nvim_set_keymap("n", "<C-b>", ":NvimTreeToggle<CR>", { noremap = true, silent = true })