2021-10-25 19:44:21 +02:00
|
|
|
require("install-packer")
|
2021-10-11 18:02:04 +02:00
|
|
|
|
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 g = vim.g
|
2021-09-06 13:29:42 +02:00
|
|
|
local cmd = vim.cmd
|
2021-11-10 13:09:54 +01:00
|
|
|
local opt = vim.opt
|
2021-08-19 16:59:40 +02:00
|
|
|
|
2021-12-18 14:41:37 +01:00
|
|
|
require("plugins")
|
2021-08-19 15:57:07 +02:00
|
|
|
|
2021-09-06 13:29:42 +02:00
|
|
|
if u.has_plugin("cmp") then
|
2021-12-18 14:41:37 +01:00
|
|
|
-- Global options
|
|
|
|
o.number = true -- show line number
|
|
|
|
o.showmatch = true -- show matching brackets
|
|
|
|
|
|
|
|
-- Indentation options
|
|
|
|
vim.cmd [[
|
|
|
|
set autoindent
|
|
|
|
set expandtab
|
|
|
|
set shiftwidth=2
|
|
|
|
set softtabstop=2
|
|
|
|
set tabstop=1
|
|
|
|
]]
|
|
|
|
|
|
|
|
g.hidden = true -- unload buffers when hidden
|
|
|
|
g.filetype = true -- execute autocommands based on filetype
|
2022-02-03 12:34:50 +01:00
|
|
|
opt.clipboard = {"unnamedplus"}
|
2021-12-18 14:41:37 +01:00
|
|
|
o.autoread = true
|
2022-01-26 20:42:58 +01:00
|
|
|
opt.termguicolors = true
|
2021-12-18 14:41:37 +01:00
|
|
|
|
|
|
|
-- Search
|
|
|
|
o.inccommand = "nosplit" -- show substitutions incrementally
|
|
|
|
o.ignorecase = true
|
|
|
|
o.smartcase = true
|
|
|
|
opt.wildignore:append(".git/*", "node_modules/*")
|
|
|
|
o.wildignorecase = true
|
|
|
|
o.lazyredraw = true
|
|
|
|
|
|
|
|
opt.listchars:append(
|
|
|
|
{
|
|
|
|
extends = "#",
|
|
|
|
eol = "↴",
|
|
|
|
space = "⋅",
|
|
|
|
tab = "▸ "
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
-- Shortmess
|
|
|
|
cmd [[set shortmess+=F]]
|
|
|
|
g.loaded_netrw = 1
|
|
|
|
g.loaded_netrwPlugin = 1
|
|
|
|
g.loaded_zipPlugin = 1
|
|
|
|
g.loaded_zip = 1
|
|
|
|
|
|
|
|
g.languagetool_server_jar = "~/build/languagetool/languagetool-server.jar"
|
|
|
|
g.languagetool_lang = "de"
|
|
|
|
|
|
|
|
cmd [[set mouse=a]] -- enable mouse interaction
|
|
|
|
cmd [[set undofile]]
|
|
|
|
cmd [[set fcs=eob:\ ]] -- disable showing ~ in empty lines
|
|
|
|
|
|
|
|
cmd [[set noshowmode]] -- to get rid of thing like --INSERT--
|
|
|
|
cmd [[set noshowcmd]] -- to get rid of display of last command
|
|
|
|
cmd [[set shortmess+=F]] -- to get rid of the file name displayed in the command line bar
|
|
|
|
|
|
|
|
cmd [[set noruler]]
|
|
|
|
|
|
|
|
g.ale_fixers = {"prettier", "eslint"}
|
|
|
|
|
2022-04-15 14:52:17 +02:00
|
|
|
require("command-center-conf")
|
2022-01-26 20:42:58 +01:00
|
|
|
|
2022-04-15 14:52:17 +02:00
|
|
|
local notify = require("notify")
|
|
|
|
vim.notify = notify;
|
|
|
|
|
|
|
|
notify.setup(
|
2022-01-26 20:42:58 +01:00
|
|
|
{
|
|
|
|
stages = "fade_in_slide_out",
|
2022-04-15 14:52:17 +02:00
|
|
|
max_width = 50,
|
2022-01-26 20:42:58 +01:00
|
|
|
render = "minimal",
|
|
|
|
background_colour = "#000000",
|
|
|
|
icons = {
|
|
|
|
ERROR = "",
|
|
|
|
WARN = "",
|
|
|
|
INFO = "",
|
|
|
|
DEBUG = "",
|
|
|
|
TRACE = "✎"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2022-03-01 23:25:44 +01:00
|
|
|
vim.wo.foldmethod = "expr"
|
|
|
|
vim.wo.foldexpr = "nvim_treesitter#foldexpr()"
|
|
|
|
vim.cmd [[
|
|
|
|
set foldlevel=99
|
|
|
|
]]
|
|
|
|
|
2022-04-15 14:52:17 +02:00
|
|
|
require("telescope-conf").setup()
|
2022-01-26 20:42:58 +01:00
|
|
|
|
2021-12-18 14:41:37 +01:00
|
|
|
-- Enable Theming / Syntax
|
|
|
|
o.syntax = "enable"
|
|
|
|
o.termguicolors = true
|
|
|
|
cmd("colorscheme nightfox")
|
|
|
|
g.material_terminal_italics = 1
|
|
|
|
g.material_theme_style = "darker"
|
|
|
|
g.tokyonight_style = "night"
|
|
|
|
g.tokyonight_transparent_sidebar = true
|
|
|
|
require("nightfox").setup(
|
|
|
|
{
|
2022-03-28 14:12:36 +02:00
|
|
|
options = {
|
|
|
|
styles = {
|
|
|
|
comments = "italic",
|
|
|
|
keywords = "bold",
|
|
|
|
types = "italic,bold"
|
|
|
|
},
|
|
|
|
transparent = true
|
|
|
|
}
|
2021-12-18 14:41:37 +01:00
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2022-03-01 23:25:44 +01:00
|
|
|
g.markdown_fenced_languages = {"html", "python", "bash=sh"}
|
|
|
|
|
2021-12-18 14:41:37 +01:00
|
|
|
-- Remove background color
|
|
|
|
cmd("highlight Normal guibg=none")
|
|
|
|
cmd("highlight NonText guibg=none")
|
|
|
|
|
2022-04-09 19:38:57 +02:00
|
|
|
|
2021-12-18 14:41:37 +01:00
|
|
|
|
|
|
|
-- Configure nvim-tree
|
|
|
|
g.nvim_tree_highlight_opened_files = 1
|
|
|
|
g.nvim_tree_group_empty = 1
|
|
|
|
g.nvim_tree_show_icons = {
|
|
|
|
folder_arrows = 0,
|
|
|
|
folders = 1,
|
|
|
|
files = 1,
|
|
|
|
git = 1
|
|
|
|
}
|
|
|
|
require("nvim-tree").setup {
|
|
|
|
auto_open = 1,
|
|
|
|
gitignore = 1,
|
|
|
|
group_empty = 1,
|
|
|
|
hijack_cursor = 1,
|
2022-04-06 23:34:14 +02:00
|
|
|
update_cwd = true,
|
2021-12-18 14:41:37 +01:00
|
|
|
update_focused_file = {
|
|
|
|
enable = false
|
|
|
|
},
|
2022-04-15 14:52:17 +02:00
|
|
|
renderer = {
|
|
|
|
indent_markers = {
|
|
|
|
enable = 0
|
|
|
|
}
|
|
|
|
},
|
2021-12-18 14:41:37 +01:00
|
|
|
diagnostics = {
|
|
|
|
enable = true,
|
|
|
|
icons = {
|
|
|
|
hint = "",
|
|
|
|
info = "",
|
|
|
|
warning = "",
|
|
|
|
error = ""
|
|
|
|
}
|
|
|
|
},
|
|
|
|
view = {
|
|
|
|
auto_resize = true,
|
|
|
|
hide_root_folder = true,
|
2022-04-06 23:34:14 +02:00
|
|
|
signcolumn = "no"
|
2021-12-18 14:41:37 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
-- Configure Wiki
|
|
|
|
g.wiki_root = "~/Notes"
|
|
|
|
g.wiki_filetypes = {"md"}
|
|
|
|
g.wiki_link_extension = ".md"
|
|
|
|
|
|
|
|
-- KeyBindings
|
|
|
|
require "keymappings"
|
|
|
|
|
2022-01-26 20:42:58 +01:00
|
|
|
require "overlays"
|
|
|
|
|
2021-12-18 14:41:37 +01:00
|
|
|
require "nvim-tmux-navigation".setup {
|
|
|
|
keybindings = {
|
|
|
|
left = "<C-h>",
|
|
|
|
down = "<C-j>",
|
|
|
|
up = "<C-k>",
|
|
|
|
right = "<C-l>",
|
|
|
|
last_active = "<C-\\>",
|
|
|
|
next = "<C-Space>"
|
|
|
|
}
|
|
|
|
}
|
2021-08-10 21:50:49 +02:00
|
|
|
|
2021-12-18 14:41:37 +01:00
|
|
|
require "nvim-autopairs".setup()
|
|
|
|
|
|
|
|
-- Treesitter config
|
|
|
|
require "treesitter-conf"
|
|
|
|
|
|
|
|
-- Autocompletion Setup
|
|
|
|
require "snippets"
|
|
|
|
require "cmp-conf"
|
|
|
|
|
|
|
|
-- LSP Config
|
|
|
|
require "lspinstaller-conf"
|
2022-03-28 14:12:36 +02:00
|
|
|
|
|
|
|
-- Setup Command OVerlays
|
2021-12-18 14:41:37 +01:00
|
|
|
require "lazy-git"
|
|
|
|
|
|
|
|
require "autocommands"
|
|
|
|
|
|
|
|
-- Setup rest.vim
|
|
|
|
require("rest-nvim").setup(
|
|
|
|
{
|
|
|
|
-- Open request results in a horizontal split
|
|
|
|
result_split_horizontal = false,
|
|
|
|
-- Skip SSL verification, useful for unknown certificates
|
|
|
|
skip_ssl_verification = false,
|
|
|
|
-- Highlight request on run
|
|
|
|
highlight = {
|
|
|
|
enabled = true,
|
|
|
|
timeout = 150
|
|
|
|
},
|
|
|
|
-- Jump to request line on run
|
|
|
|
jump_to_request = false
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
-- LSP Config
|
|
|
|
require "lspinstaller-conf"
|
2022-04-09 19:38:57 +02:00
|
|
|
-- require "lsp-conf"
|
2021-08-19 17:24:36 +02:00
|
|
|
else
|
2021-12-18 14:41:37 +01:00
|
|
|
vim.cmd [[PackerSync]]
|
2021-08-31 21:22:57 +02:00
|
|
|
end
|