neovim-config/init.lua

99 lines
2.2 KiB
Lua
Raw Normal View History

2021-03-26 04:51:32 +00:00
-- load all plugins
2021-04-06 04:57:32 +00:00
require "pluginsList.lua"
require "file-icons.lua"
2021-03-07 14:22:30 +00:00
2021-04-06 04:57:32 +00:00
require "misc-utils.lua"
require "bufferline.lua"
require "statusline.lua"
2021-03-12 07:04:15 +00:00
2021-04-06 04:57:32 +00:00
require("colorizer").setup()
require("neoscroll").setup() -- smooth scroll
2021-03-26 04:51:32 +00:00
2021-03-11 19:00:34 +00:00
-- lsp
2021-04-06 04:57:32 +00:00
require "lspconfig.lua"
require "compe.lua"
2021-03-11 19:00:34 +00:00
2021-03-07 14:22:30 +00:00
local cmd = vim.cmd
local g = vim.g
2021-03-26 04:51:32 +00:00
g.mapleader = " "
g.auto_save = 1
-- colorscheme related stuff
2021-03-07 14:22:30 +00:00
2021-03-13 01:23:02 +00:00
cmd "syntax enable"
cmd "syntax on"
2021-03-07 14:22:30 +00:00
local base16 = require "base16"
base16(base16.themes["onedark"], true)
2021-03-26 04:51:32 +00:00
-- blankline
local indent = 2
2021-03-13 02:48:23 +00:00
g.indentLine_enabled = 1
2021-03-26 04:51:32 +00:00
g.indent_blankline_char = ""
2021-03-07 14:22:30 +00:00
2021-04-06 04:57:32 +00:00
cmd "hi IndentBlanklineChar guifg=#2a2e36"
2021-03-26 04:51:32 +00:00
g.indent_blankline_filetype_exclude = {"help", "terminal"}
2021-04-04 11:47:11 +00:00
g.indent_blankline_buftype_exclude = {"terminal"}
2021-03-26 04:51:32 +00:00
g.indent_blankline_show_trailing_blankline_indent = false
g.indent_blankline_show_first_indent_level = false
2021-03-07 14:22:30 +00:00
2021-03-13 01:23:02 +00:00
require("treesitter.lua")
require("mappings.lua")
2021-04-04 11:47:11 +00:00
-- highlights --
2021-04-06 04:57:32 +00:00
cmd "hi LineNr guifg=#383c44 guibg=NONE"
cmd "hi Comment guifg=#3d4149"
cmd "hi SignColumn guibg=NONE"
cmd "hi VertSplit guibg=NONE guifg=#2a2e36"
cmd "hi EndOfBuffer guifg=#1e222a"
cmd "hi PmenuSel guibg=#98c379"
cmd "hi Pmenu guibg=#282c34"
2021-03-07 14:22:30 +00:00
2021-04-04 11:47:11 +00:00
-- telescope stuff and popupmenu
2021-04-06 04:57:32 +00:00
require "telescope.lua"
cmd "hi TelescopeBorder guifg=#2a2e36"
cmd "hi TelescopePromptBorder guifg=#2a2e36"
cmd "hi TelescopeResultsBorder guifg=#2a2e36"
cmd "hi TelescopePreviewBorder guifg=#525865"
-- nvim tree color for folder name and icon
require "nvimTree.lua"
cmd "hi NvimTreeFolderIcon guifg = #61afef"
cmd "hi NvimTreeFolderName guifg = #61afef"
cmd "hi NvimTreeIndentMarker guifg=#383c44"
2021-03-12 07:04:15 +00:00
2021-04-06 04:57:32 +00:00
cmd "hi Normal guibg=NONE ctermbg=NONE"
2021-03-11 19:00:34 +00:00
2021-04-06 04:57:32 +00:00
-- git signs
require "gitsigns.lua"
cmd "hi DiffAdd guifg=#81A1C1 guibg = none"
cmd "hi DiffChange guifg =#3A3E44 guibg = none"
cmd "hi DiffModified guifg = #81A1C1 guibg = none"
2021-03-21 11:09:29 +00:00
2021-03-13 01:23:02 +00:00
require("nvim-autopairs").setup()
2021-04-06 05:20:23 +00:00
2021-03-13 01:23:02 +00:00
require("lspkind").init(
{
2021-04-06 05:20:23 +00:00
with_text = true,
symbol_map = {
Folder = ""
}
2021-03-13 01:23:02 +00:00
}
)
2021-03-19 12:25:30 +00:00
2021-04-04 11:59:05 +00:00
-- hide line numbers in terminal windows
2021-04-04 06:05:37 +00:00
vim.api.nvim_exec([[
au BufEnter term://* setlocal nonumber
]], false)
2021-04-04 11:59:05 +00:00
-- inactive statuslines as thin splitlines
2021-04-06 02:59:37 +00:00
cmd("highlight! StatusLineNC gui=underline guibg=NONE guifg=#383c44")