267 lines
5.8 KiB
Lua
267 lines
5.8 KiB
Lua
vim.cmd [[packadd packer.nvim]]
|
|
|
|
|
|
require('packer').startup(function(use)
|
|
use 'wbthomason/packer.nvim'
|
|
|
|
use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' }
|
|
|
|
use { "ellisonleao/gruvbox.nvim" }
|
|
use 'neovim/nvim-lspconfig' -- Configurations for Nvim LSP
|
|
|
|
use {
|
|
"williamboman/mason.nvim",
|
|
"williamboman/mason-lspconfig.nvim",
|
|
}
|
|
|
|
use {
|
|
'hrsh7th/cmp-nvim-lsp',
|
|
'hrsh7th/cmp-buffer',
|
|
'hrsh7th/cmp-path',
|
|
'hrsh7th/cmp-cmdline',
|
|
'f3fora/cmp-spell',
|
|
'hrsh7th/nvim-cmp',
|
|
}
|
|
|
|
use {
|
|
'L3MON4D3/LuaSnip',
|
|
'saadparwaiz1/cmp_luasnip'
|
|
}
|
|
|
|
use {
|
|
"nvim-neo-tree/neo-tree.nvim",
|
|
branch = "v3.x",
|
|
requires = {
|
|
"nvim-lua/plenary.nvim",
|
|
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
|
"MunifTanjim/nui.nvim",
|
|
}
|
|
}
|
|
|
|
use {
|
|
"folke/trouble.nvim"
|
|
}
|
|
|
|
use { 'onsails/lspkind.nvim' }
|
|
use 'f-person/auto-dark-mode.nvim'
|
|
|
|
use {
|
|
'nvim-lualine/lualine.nvim',
|
|
requires = { 'nvim-tree/nvim-web-devicons', opt = true }
|
|
}
|
|
|
|
use {
|
|
"SmiteshP/nvim-navic",
|
|
requires = "neovim/nvim-lspconfig"
|
|
}
|
|
|
|
--use 'vim-airline/vim-airline'
|
|
--use 'vim-airline/vim-airline-themes'
|
|
|
|
use 'lervag/vimtex'
|
|
use 'folke/neodev.nvim'
|
|
use 'kosayoda/nvim-lightbulb'
|
|
use {
|
|
'nvim-telescope/telescope.nvim', tag = '0.1.x',
|
|
requires = { { 'nvim-lua/plenary.nvim' } }
|
|
}
|
|
end)
|
|
|
|
require("gruvbox").setup({
|
|
undercurl = true,
|
|
underline = true,
|
|
bold = true,
|
|
italic = {
|
|
strings = true,
|
|
comments = true,
|
|
},
|
|
strikethrough = true,
|
|
invert_selection = false,
|
|
invert_signs = false,
|
|
invert_tabline = false,
|
|
invert_intend_guides = false,
|
|
inverse = true, -- invert background for search, diffs, statuslines and errors
|
|
contrast = "soft", -- can be "hard", "soft" or empty string
|
|
overrides = {},
|
|
})
|
|
|
|
require 'nvim-treesitter.configs'.setup {
|
|
-- A list of parser names, or "all"
|
|
ensure_installed = "all",
|
|
|
|
-- Install parsers synchronously (only applied to `ensure_installed`)
|
|
sync_install = false,
|
|
|
|
-- Automatically install missing parsers when entering buffer
|
|
auto_install = true,
|
|
|
|
-- List of parsers to ignore installing (for "all")
|
|
ignore_install = { "phpdoc" },
|
|
|
|
---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
|
|
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
|
|
|
|
highlight = {
|
|
-- `false` will disable the whole extension
|
|
enable = true,
|
|
|
|
-- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
|
|
-- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
|
|
-- the name of the parser)
|
|
-- list of language that will be disabled
|
|
disable = {},
|
|
|
|
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
|
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
|
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
|
-- Instead of true it can also be a list of languages
|
|
additional_vim_regex_highlighting = false,
|
|
},
|
|
}
|
|
|
|
|
|
local auto_dark_mode = require('auto-dark-mode')
|
|
|
|
auto_dark_mode.setup({
|
|
update_interval = 1000,
|
|
set_dark_mode = function()
|
|
vim.api.nvim_set_option('background', 'dark')
|
|
vim.cmd('colorscheme gruvbox')
|
|
vim.cmd("let g:neovide_background_color = '#32302f'.printf('%x', float2nr(255 * g:transparency))");
|
|
--vim.cmd('hi Normal guibg=NONE ctermbg=NONE')
|
|
end,
|
|
set_light_mode = function()
|
|
vim.api.nvim_set_option('background', 'light')
|
|
vim.cmd('colorscheme gruvbox')
|
|
vim.cmd("let g:neovide_background_color = '#f2e5bc'.printf('%x', float2nr(255 * g:transparency))");
|
|
--vim.cmd('hi Normal guibg=NONE ctermbg=NONE')
|
|
end,
|
|
})
|
|
auto_dark_mode.init()
|
|
|
|
require('lualine').setup {
|
|
options = {
|
|
icons_enabled = true,
|
|
theme = 'gruvbox',
|
|
component_separators = { left = '', right = '' },
|
|
section_separators = { left = '', right = '' },
|
|
disabled_filetypes = {
|
|
statusline = {
|
|
"neo-tree",
|
|
},
|
|
winbar = {
|
|
"help",
|
|
"startify",
|
|
"dashboard",
|
|
"packer",
|
|
"neogitstatus",
|
|
"NvimTree",
|
|
"neo-tree",
|
|
"Trouble",
|
|
"alpha",
|
|
"lir",
|
|
"Outline",
|
|
"spectre_panel",
|
|
"toggleterm",
|
|
},
|
|
},
|
|
ignore_focus = {},
|
|
always_divide_middle = true,
|
|
globalstatus = false,
|
|
refresh = {
|
|
statusline = 1000,
|
|
tabline = 1000,
|
|
winbar = 1000,
|
|
}
|
|
},
|
|
sections = {
|
|
lualine_a = { 'mode' },
|
|
lualine_b = { 'diff', 'diagnostics' },
|
|
lualine_c = { 'filename' },
|
|
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
|
lualine_y = { 'progress' },
|
|
lualine_z = { 'location' }
|
|
},
|
|
inactive_sections = {
|
|
lualine_a = {},
|
|
lualine_b = {},
|
|
lualine_c = { 'filename' },
|
|
lualine_x = { 'location' },
|
|
lualine_y = {},
|
|
lualine_z = {},
|
|
},
|
|
tabline = {
|
|
lualine_a = {
|
|
{
|
|
"buffers",
|
|
mode = 2,
|
|
}
|
|
},
|
|
lualine_b = {
|
|
"branch"
|
|
},
|
|
lualine_c = { 'hostname' },
|
|
lualine_x = {},
|
|
lualine_y = {},
|
|
lualine_z = { 'tabs', 'datetime' },
|
|
},
|
|
winbar = {
|
|
lualine_a = { 'searchcount' },
|
|
lualine_b = {},
|
|
lualine_c = {
|
|
"filename",
|
|
"navic",
|
|
},
|
|
lualine_x = {},
|
|
lualine_y = {},
|
|
lualine_z = {},
|
|
},
|
|
inactive_winbar = {
|
|
lualine_a = {},
|
|
lualine_b = {},
|
|
lualine_c = {
|
|
"filename",
|
|
"navic"
|
|
},
|
|
lualine_x = {},
|
|
lualine_y = {},
|
|
lualine_z = {},
|
|
},
|
|
extensions = {}
|
|
}
|
|
require 'nvim-navic'.setup {
|
|
icons = {
|
|
File = ' ',
|
|
Module = ' ',
|
|
Namespace = ' ',
|
|
Package = ' ',
|
|
Class = ' ',
|
|
Method = ' ',
|
|
Property = ' ',
|
|
Field = ' ',
|
|
Constructor = ' ',
|
|
Enum = ' ',
|
|
Interface = ' ',
|
|
Function = ' ',
|
|
Variable = ' ',
|
|
Constant = ' ',
|
|
String = ' ',
|
|
Number = ' ',
|
|
Boolean = ' ',
|
|
Array = ' ',
|
|
Object = ' ',
|
|
Key = ' ',
|
|
Null = ' ',
|
|
EnumMember = ' ',
|
|
Struct = ' ',
|
|
Event = ' ',
|
|
Operator = ' ',
|
|
TypeParameter = ' ',
|
|
},
|
|
separator = ' ',
|
|
}
|
|
|
|
require 'nvim-lightbulb'.setup {
|
|
autocmd = { enabled = true }
|
|
}
|