From 104a2849db44f399b91674ab40f2691cb227a275 Mon Sep 17 00:00:00 2001 From: Jim Richter Date: Thu, 19 Aug 2021 17:14:34 +0200 Subject: [PATCH] fix: init.lua --- configs/init.lua | 98 ++++++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/configs/init.lua b/configs/init.lua index 4aeb2e9..9c7c438 100644 --- a/configs/init.lua +++ b/configs/init.lua @@ -31,63 +31,63 @@ paq:setup({verbose=true}) { {url="git@github.com:akinsho/nvim-toggleterm.lua"} } -local status = pcall(require, "material"); -if not(status) then +if u.has_plugin("nvim-treesiter") then paq.install(); -end +else --- 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]] + -- 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]] --- Apply Theme -o.syntax = "enable" -o.termguicolors = true -g.NERDTreeShowHidden = true -g.NERDTreeAutoDeleteBuffer = true -g.NERDTreeMinimalUI = true -g.NERDTreeDirArrows = true -g.hidden = true -g.material_theme_style = "ocean_community" -if u.has_plugin("material") then - cmd [[colorscheme material]] -end --- Remove background color -cmd [[highlight Normal guibg=none]] -cmd [[highlight NonText guibg=none]] + -- Apply Theme + o.syntax = "enable" + o.termguicolors = true + g.NERDTreeShowHidden = true + g.NERDTreeAutoDeleteBuffer = true + g.NERDTreeMinimalUI = true + g.NERDTreeDirArrows = true + g.hidden = true + g.material_theme_style = "ocean_community" + if u.has_plugin("material") then + cmd [[colorscheme material]] + end + -- Remove background color + cmd [[highlight Normal guibg=none]] + cmd [[highlight NonText guibg=none]] --- KeyBindings -g.mapleader = " " -require "keymappings" + -- KeyBindings + g.mapleader = " " + require "keymappings" --- Treesitter config -require "nvim-treesitter.configs".setup {ensure_installed = {"bash", "svelte", "css", "svelte", "typescript", "javascript", "xml", "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" -) + -- 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" + ) --- Autocompletion Setup -require "autocomplete" + -- Autocompletion Setup + require "autocomplete" --- LSP Config + -- LSP Config -require "lsp-utils" + require "lsp-utils" -opt.completeopt = {"menuone", "noinsert", "noselect"} -opt.shortmess:append({c = true}) + opt.completeopt = {"menuone", "noinsert", "noselect"} + opt.shortmess:append({c = true}) --- Autoformat -require "autoformatter" + -- Autoformat + require "autoformatter" +end \ No newline at end of file