65 lines
1.3 KiB
Lua
65 lines
1.3 KiB
Lua
vim.opt.termguicolors = true
|
|
vim.opt.number = true
|
|
vim.opt.relativenumber = true
|
|
vim.opt.hlsearch = true
|
|
vim.opt.ignorecase = true
|
|
vim.opt.tabstop = 2
|
|
vim.opt.shiftwidth = 2
|
|
vim.opt.expandtab = true
|
|
|
|
vim.g.loaded_netrw = 1
|
|
vim.g.loaded_netrwPlugin = 1
|
|
|
|
vim.g.neon_style = "doom"
|
|
vim.g.neon_italic_keyword = true
|
|
vim.g.neon_italic_function = true
|
|
vim.g.neon_transparent = true
|
|
|
|
require('plugins')
|
|
require('gitsigns-config')
|
|
require('lsp')
|
|
require('nvim-tree').setup({
|
|
update_focused_file = {
|
|
enable = true
|
|
}
|
|
})
|
|
vim.cmd[[colorscheme neon]]
|
|
|
|
local function open_nvim_tree(data)
|
|
|
|
-- buffer is a [No Name]
|
|
local no_name = data.file == "" and vim.bo[data.buf].buftype == ""
|
|
|
|
-- buffer is a directory
|
|
local directory = vim.fn.isdirectory(data.file) == 1
|
|
|
|
if not no_name and not directory then
|
|
return
|
|
end
|
|
|
|
-- change to the directory
|
|
if directory then
|
|
vim.cmd.cd(data.file)
|
|
end
|
|
|
|
-- open the tree
|
|
require("nvim-tree.api").tree.open()
|
|
end
|
|
|
|
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })
|
|
|
|
require'nvim-treesitter.configs'.setup {
|
|
highlight = {
|
|
enable = true,
|
|
additional_vim_regex_highlighting = false,
|
|
},
|
|
indent = {
|
|
enable = true
|
|
}
|
|
}
|
|
|
|
-- Configure highlighting of current file
|
|
local c = require("neon.colors")
|
|
vim.opt.cursorline = true
|
|
vim.api.nvim_set_hl(0, "CursorLine", { bg=c.bg0, underline = None })
|