2021-08-19 17:04:46 +02:00
|
|
|
local u = require("utils")
|
|
|
|
|
2021-08-10 21:50:49 +02:00
|
|
|
local o = vim.o
|
|
|
|
local opt = vim.opt
|
|
|
|
local g = vim.g
|
2021-08-19 16:59:40 +02:00
|
|
|
local cmd = vim.cmd;
|
|
|
|
|
2021-08-19 15:57:07 +02:00
|
|
|
require("install-paq")
|
2021-08-19 16:44:25 +02:00
|
|
|
|
|
|
|
local paq = require("paq");
|
2021-08-19 16:42:49 +02:00
|
|
|
paq:setup({verbose=true}) {
|
2021-09-02 13:26:22 +02:00
|
|
|
"savq/paq-nvim", -- Let Paq manage itself
|
2021-08-19 15:57:07 +02:00
|
|
|
-- Theming Plugins
|
2021-09-02 13:26:22 +02:00
|
|
|
"kaicataldo/material.vim",
|
|
|
|
"ryanoasis/vim-devicons",
|
|
|
|
"junegunn/fzf",
|
|
|
|
"xiyaowong/nvim-transparent",
|
2021-08-19 15:57:07 +02:00
|
|
|
-- Layout Plugins
|
2021-09-02 13:26:22 +02:00
|
|
|
"preservim/nerdtree",
|
|
|
|
"preservim/nerdtree",
|
|
|
|
"jistr/vim-nerdtree-tabs",
|
2021-08-19 15:57:07 +02:00
|
|
|
-- Code Navigation
|
2021-09-02 13:26:22 +02:00
|
|
|
"nvim-lua/popup.nvim",
|
|
|
|
"nvim-lua/plenary.nvim",
|
|
|
|
"nvim-telescope/telescope.nvim",
|
2021-08-19 15:57:07 +02:00
|
|
|
-- Syntax / Autocomplete
|
2021-09-02 13:26:22 +02:00
|
|
|
"neovim/nvim-lspconfig",
|
|
|
|
"nvim-lua/lsp-status.nvim",
|
|
|
|
"hrsh7th/nvim-compe",
|
|
|
|
{"nvim-treesitter/nvim-treesitter", run = ":TSUpdate"},
|
2021-08-19 15:57:07 +02:00
|
|
|
-- Formatting
|
2021-09-02 13:26:22 +02:00
|
|
|
"mhartington/formatter.nvim",
|
2021-08-19 15:57:07 +02:00
|
|
|
-- Git Interface
|
2021-09-02 13:26:22 +02:00
|
|
|
"akinsho/nvim-toggleterm.lua"
|
2021-08-19 15:57:07 +02:00
|
|
|
}
|
|
|
|
|
2021-08-19 17:24:36 +02:00
|
|
|
if u.has_plugin("material") then
|
|
|
|
|
|
|
|
print("Load config")
|
2021-08-19 16:42:49 +02:00
|
|
|
|
2021-08-19 17:14:34 +02:00
|
|
|
-- Global options
|
|
|
|
o.number = true
|
|
|
|
o.tabstop = 2
|
|
|
|
o.shiftwidth = 2 -- Indents will have a width of 4
|
|
|
|
o.softtabstop = 2 -- Sets the number of columns for a TAB
|
|
|
|
o.expandtab = false -- Expand TABs to spaces
|
|
|
|
cmd [[set mouse=a]]
|
|
|
|
cmd [[set undofile]]
|
2021-08-12 13:12:30 +02:00
|
|
|
|
2021-08-19 17:14:34 +02:00
|
|
|
-- Apply Theme
|
|
|
|
o.syntax = "enable"
|
|
|
|
o.termguicolors = true
|
|
|
|
g.NERDTreeShowHidden = true
|
|
|
|
g.NERDTreeAutoDeleteBuffer = true
|
|
|
|
g.NERDTreeMinimalUI = true
|
|
|
|
g.NERDTreeDirArrows = true
|
2021-09-02 13:26:22 +02:00
|
|
|
g.NERDTreeCustomOpenArgs={file = {where = 't'}}
|
|
|
|
g.hidden = true
|
2021-08-19 17:24:36 +02:00
|
|
|
g.material_style = "deep ocean"
|
|
|
|
require("transparent").setup({enable = true})
|
2021-08-19 17:14:34 +02:00
|
|
|
-- Remove background color
|
2021-08-19 17:24:36 +02:00
|
|
|
cmd("highlight Normal guibg=none")
|
|
|
|
cmd("highlight NonText guibg=none")
|
2021-08-10 21:50:49 +02:00
|
|
|
|
2021-08-19 17:14:34 +02:00
|
|
|
-- KeyBindings
|
|
|
|
g.mapleader = " "
|
|
|
|
require "keymappings"
|
2021-08-10 21:50:49 +02:00
|
|
|
|
2021-08-19 17:14:34 +02:00
|
|
|
-- Treesitter config
|
|
|
|
require "nvim-treesitter.configs".setup {ensure_installed = {"bash", "svelte", "css", "svelte", "typescript", "javascript", "go", "lua", "yaml"}, highlight = {enable = true}}
|
|
|
|
-- Toggleterm / Lazygit setup
|
|
|
|
require "lazy-git"
|
|
|
|
-- Autocommands
|
|
|
|
u.create_augroup(
|
|
|
|
{
|
|
|
|
{"VimEnter", "*", "if (@% == '') | NERDTree | endif"},
|
|
|
|
{"BufEnter", "*", 'if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif'}
|
|
|
|
},
|
|
|
|
"Nerdtree"
|
|
|
|
)
|
2021-08-10 21:50:49 +02:00
|
|
|
|
2021-08-19 17:14:34 +02:00
|
|
|
-- Autocompletion Setup
|
|
|
|
require "autocomplete"
|
2021-08-10 21:50:49 +02:00
|
|
|
|
2021-08-19 17:14:34 +02:00
|
|
|
-- LSP Config
|
2021-08-19 16:09:20 +02:00
|
|
|
|
2021-08-19 17:14:34 +02:00
|
|
|
require "lsp-utils"
|
2021-08-10 21:50:49 +02:00
|
|
|
|
2021-08-19 17:14:34 +02:00
|
|
|
opt.completeopt = {"menuone", "noinsert", "noselect"}
|
|
|
|
opt.shortmess:append({c = true})
|
2021-08-10 21:50:49 +02:00
|
|
|
|
2021-08-19 17:14:34 +02:00
|
|
|
-- Autoformat
|
|
|
|
require "autoformatter"
|
2021-08-19 16:09:20 +02:00
|
|
|
|
2021-08-19 17:24:36 +02:00
|
|
|
|
|
|
|
else
|
|
|
|
paq.install();
|
2021-08-31 21:22:57 +02:00
|
|
|
end
|