2024-06-02 11:25:18 +08:00
|
|
|
-- disable netrw at the very start of your init.lua
|
|
|
|
vim.g.loaded_netrw = 1
|
|
|
|
vim.g.loaded_netrwPlugin = 1
|
|
|
|
|
|
|
|
|
2024-06-01 23:34:37 +08:00
|
|
|
local vim = vim
|
|
|
|
local Plug = vim.fn['plug#']
|
|
|
|
|
2024-06-02 17:27:16 +08:00
|
|
|
vim.cmd('filetype plugin indent on')
|
|
|
|
vim.cmd('syntax enable')
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-01 23:34:37 +08:00
|
|
|
vim.call('plug#begin')
|
|
|
|
|
2024-06-02 12:12:17 +08:00
|
|
|
-- file tree
|
2024-06-02 11:25:18 +08:00
|
|
|
Plug('nvim-tree/nvim-web-devicons')
|
|
|
|
Plug('nvim-tree/nvim-tree.lua')
|
2024-06-01 23:34:37 +08:00
|
|
|
|
2024-06-02 12:12:17 +08:00
|
|
|
-- for latex
|
|
|
|
Plug('lervag/vimtex')
|
|
|
|
|
2024-06-02 17:54:02 +08:00
|
|
|
Plug('SirVer/UltiSnips')
|
|
|
|
|
|
|
|
|
2024-06-01 23:34:37 +08:00
|
|
|
vim.call('plug#end')
|
2024-06-02 11:26:42 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- optionally enable 24-bit colour
|
|
|
|
vim.opt.termguicolors = true
|
2024-06-02 18:31:32 +08:00
|
|
|
vim.opt.nu = true
|
2024-06-02 11:26:42 +08:00
|
|
|
|
|
|
|
-- empty setup using defaults
|
2024-06-02 11:28:54 +08:00
|
|
|
require("nvim-tree").setup({
|
|
|
|
sort = {
|
|
|
|
sorter = "case_sensitive",
|
|
|
|
},
|
|
|
|
view = {
|
|
|
|
width = 30,
|
|
|
|
},
|
|
|
|
renderer = {
|
|
|
|
group_empty = true,
|
|
|
|
},
|
|
|
|
filters = {
|
|
|
|
dotfiles = true,
|
|
|
|
},
|
|
|
|
})
|
2024-06-02 16:11:58 +08:00
|
|
|
|
2024-06-02 18:31:32 +08:00
|
|
|
-- for vimtex
|
2024-06-02 16:11:58 +08:00
|
|
|
|
2024-06-02 18:31:32 +08:00
|
|
|
-- Viewer options: One may configure the viewer either by specifying a built-in
|
|
|
|
-- viewer method:
|
|
|
|
let g:vimtex_view_method = 'zathura'
|
|
|
|
|
|
|
|
|
2024-06-02 16:11:58 +08:00
|
|
|
|