2023-04-07 16:24:48 +00:00
|
|
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
|
|
|
if not vim.loop.fs_stat(lazypath) then
|
|
|
|
vim.fn.system({
|
|
|
|
"git",
|
|
|
|
"clone",
|
|
|
|
"--filter=blob:none",
|
|
|
|
"https://github.com/folke/lazy.nvim.git",
|
|
|
|
"--branch=stable",
|
|
|
|
lazypath,
|
|
|
|
})
|
|
|
|
end
|
|
|
|
vim.opt.rtp:prepend(lazypath)
|
2023-01-03 14:59:56 +00:00
|
|
|
|
2023-04-07 16:24:48 +00:00
|
|
|
require("lazy").setup({
|
|
|
|
{ "Shatur/neovim-ayu", lazy = false, enabled = true },
|
|
|
|
"junegunn/fzf.vim",
|
|
|
|
"yggdroot/indentline",
|
|
|
|
"yuezk/vim-js",
|
|
|
|
{ "neoclide/coc.nvim", branch = "release" },
|
|
|
|
{
|
|
|
|
"nvim-lualine/lualine.nvim",
|
|
|
|
dependencies = {
|
|
|
|
"nvim-tree/nvim-web-devicons"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"nvim-telescope/telescope.nvim",
|
|
|
|
branch = "0.1.x",
|
|
|
|
dependencies = {
|
|
|
|
"nvim-lua/plenary.nvim",
|
|
|
|
"jremmen/vim-ripgrep",
|
|
|
|
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
|
|
|
|
"nvim-tree/nvim-web-devicons"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"tpope/vim-fugitive",
|
|
|
|
{ "rrethy/vim-hexokinase", build = "make hexokinase" },
|
|
|
|
"mbbill/undotree",
|
|
|
|
"skanehira/docker-compose.vim",
|
|
|
|
"chr4/nginx.vim",
|
|
|
|
"machakann/vim-highlightedyank",
|
|
|
|
"godlygeek/tabular",
|
|
|
|
"preservim/vim-markdown",
|
|
|
|
"tpope/vim-obsession",
|
2023-04-10 00:21:36 +00:00
|
|
|
{
|
|
|
|
"akinsho/bufferline.nvim",
|
|
|
|
dependencies = {
|
|
|
|
"nvim-tree/nvim-web-devicons"
|
|
|
|
}
|
|
|
|
}
|
2023-04-07 16:24:48 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
--- THEMING ---
|
|
|
|
|
2023-04-10 00:21:36 +00:00
|
|
|
vim.opt.termguicolors = true
|
|
|
|
|
2023-04-07 16:24:48 +00:00
|
|
|
require('ayu').setup({
|
|
|
|
mirage = true,
|
|
|
|
overrides = function()
|
|
|
|
if vim.o.background == "dark" then
|
|
|
|
return {
|
2023-04-10 00:21:11 +00:00
|
|
|
Normal = {
|
|
|
|
bg = '#0f1419',
|
|
|
|
fg = '#cbccc6'
|
|
|
|
},
|
2023-04-07 16:24:48 +00:00
|
|
|
Comment = { fg = "#5c6773" }
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
require('ayu').colorscheme()
|
|
|
|
|
2023-04-07 23:31:57 +00:00
|
|
|
-- Change pane split styling
|
|
|
|
vim.api.nvim_set_hl(0, "VertSplit", { link = "Conceal"})
|
|
|
|
|
2023-04-07 16:24:48 +00:00
|
|
|
--- Change default behaviour ---
|
|
|
|
-- Disable integrated providers
|
|
|
|
vim.g.loaded_ruby_provider = 0
|
|
|
|
vim.g.loaded_perl_provider = 0
|
|
|
|
vim.g.loaded_node_provider = 0
|
|
|
|
|
|
|
|
-- Disable error bell
|
|
|
|
vim.opt.errorbells = false
|
|
|
|
|
2023-04-07 23:32:18 +00:00
|
|
|
-- Hide emptyline ~
|
|
|
|
vim.opt.fillchars = { eob = " " }
|
|
|
|
|
2023-04-07 16:24:48 +00:00
|
|
|
--- Tab configuration ---
|
|
|
|
-- Show tabs at 4 spaces
|
|
|
|
vim.opt.tabstop = 4
|
|
|
|
vim.opt.softtabstop = 4
|
|
|
|
|
|
|
|
-- When indenting with '>', use 4 spaces
|
|
|
|
vim.opt.shiftwidth = 4
|
|
|
|
|
|
|
|
-- Insert 4 spaces instead of tab
|
|
|
|
vim.opt.expandtab = true
|
|
|
|
|
|
|
|
--- Line formatting ---
|
|
|
|
vim.opt.nu = true
|
|
|
|
vim.opt.wrap = false
|
|
|
|
|
|
|
|
--- Search configuration ---
|
|
|
|
vim.opt.smartcase = true
|
|
|
|
vim.opt.ignorecase = true
|
|
|
|
|
|
|
|
--- Window configuration ---
|
|
|
|
vim.opt.splitright = true
|
|
|
|
vim.opt.splitbelow = true
|
|
|
|
-- Remove duplicate -- INSERT --
|
|
|
|
vim.opt.showmode = false
|
|
|
|
|
|
|
|
--- Operation configuration ---
|
|
|
|
vim.opt.swapfile = false
|
|
|
|
vim.opt.backup = false
|
2023-04-11 07:21:33 +00:00
|
|
|
vim.opt.undodir = vim.fn.expand('~').."/.config/nvim/undodir"
|
2023-04-07 16:24:48 +00:00
|
|
|
vim.opt.undofile = true
|
|
|
|
|
|
|
|
--- Folding behaviour configuration ---
|
|
|
|
vim.opt.foldmethod = "indent"
|
|
|
|
vim.opt.foldnestmax = 10
|
|
|
|
vim.opt.foldenable = false
|
|
|
|
vim.opt.foldlevel = 99
|
|
|
|
vim.opt.signcolumn = "no"
|
|
|
|
|
|
|
|
--- Miscellaneous ---
|
|
|
|
-- rg smart root finder and adds git ignore loading for faster execution
|
|
|
|
if vim.fn.executable("rg") == 1 then
|
|
|
|
vim.g.rg_derive_root = true
|
|
|
|
end
|
|
|
|
|
|
|
|
-- Disable mouse
|
|
|
|
vim.opt.mouse = nil
|
|
|
|
|
|
|
|
-- Source CoC configuration
|
|
|
|
vim.cmd("source ~/.config/nvim/coc.vim")
|
|
|
|
|
|
|
|
-- IndentLine configuration
|
|
|
|
vim.g.indentLine_enabled = 1
|
|
|
|
vim.g.indentLine_char_list = {'|', '¦', '┆', '┊'}
|
|
|
|
vim.g.indentLine_setColors = 1
|
|
|
|
vim.g.indentLine_color_gui = "#5C6370"
|
|
|
|
vim.g.indentLine_showFirstIndentLevel = 1
|
|
|
|
|
|
|
|
-- Advertise 256 colors capability (for tmux)
|
|
|
|
vim.t_Co = 256
|
|
|
|
|
|
|
|
-- Undocumented ???
|
|
|
|
--vim.&t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
|
|
|
--vim.&t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
|
|
|
|
|
|
|
|
--- Lualine ---
|
|
|
|
-- Setup
|
2023-04-10 00:21:11 +00:00
|
|
|
local custom_ayu_dark = require("lualine.themes.ayu_dark")
|
|
|
|
|
|
|
|
custom_ayu_dark.normal.c.bg = "#080b0d"
|
|
|
|
|
2023-04-07 16:24:48 +00:00
|
|
|
require("lualine").setup({
|
|
|
|
options = {
|
2023-04-10 00:21:11 +00:00
|
|
|
theme = custom_ayu_dark,
|
2023-04-07 16:24:48 +00:00
|
|
|
section_separators = { left = '', right = '' },
|
|
|
|
component_separators = { left = '', right = '' },
|
2023-04-07 23:32:37 +00:00
|
|
|
globalstatus = true,
|
2023-04-07 16:24:48 +00:00
|
|
|
},
|
|
|
|
sections = {
|
|
|
|
lualine_a = {'mode'},
|
|
|
|
lualine_b = {'branch', 'diff', 'diagnostics'},
|
|
|
|
lualine_c = {'filename'},
|
|
|
|
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
|
|
|
lualine_y = {},
|
|
|
|
lualine_z = {'location'}
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
2023-04-10 00:21:36 +00:00
|
|
|
--- Bufferline (tabs) ---
|
|
|
|
-- Setup
|
|
|
|
require("bufferline").setup({
|
|
|
|
options = {
|
|
|
|
mode = "tabs",
|
|
|
|
numbers = "ordinal",
|
|
|
|
indicator = {
|
|
|
|
style = "icon"
|
|
|
|
},
|
|
|
|
color_icons = true,
|
|
|
|
show_close_icon = false,
|
|
|
|
show_buffer_close_icons = false,
|
|
|
|
show_buffer_default_icon = false,
|
|
|
|
show_duplicate_prefix = false,
|
|
|
|
hover = {
|
|
|
|
enabled = false
|
|
|
|
},
|
|
|
|
},
|
|
|
|
highlights = {
|
|
|
|
buffer_selected = {
|
|
|
|
fg = "fg",
|
|
|
|
bg = "bg",
|
|
|
|
italic = false,
|
|
|
|
},
|
|
|
|
numbers_selected = {
|
|
|
|
fg = "bg",
|
|
|
|
bg = "fg"
|
|
|
|
},
|
|
|
|
indicator_selected = {
|
|
|
|
fg = {
|
|
|
|
attribute = "fg",
|
|
|
|
highlight = "Identifier"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2023-07-14 11:37:00 +00:00
|
|
|
--- Treesitter ---
|
|
|
|
require("nvim-treesitter.configs").setup {
|
|
|
|
highlight = {
|
|
|
|
enable = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-08 21:58:37 +00:00
|
|
|
--- Telescope ---
|
|
|
|
require("telescope-config")
|
|
|
|
require("telescope-mappings")
|
|
|
|
|
2023-04-07 16:24:48 +00:00
|
|
|
require("keybindings")
|