fix some stuff
This commit is contained in:
parent
8bcf911065
commit
4e3a029053
@ -1,6 +1,10 @@
|
|||||||
local o = vim.o
|
local o = vim.o
|
||||||
local opt = vim.opt
|
local opt = vim.opt
|
||||||
local g = vim.g
|
local g = vim.g
|
||||||
|
local cmd = vim.cmd;
|
||||||
|
|
||||||
|
cmd [[highlight Normal guibg=none]]
|
||||||
|
cmd [[highlight NonText guibg=none]]
|
||||||
|
|
||||||
require("install-paq")
|
require("install-paq")
|
||||||
|
|
||||||
@ -29,9 +33,8 @@ paq:setup({verbose=true}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
local status = pcall(require, "material");
|
local status = pcall(require, "material");
|
||||||
print(status);
|
|
||||||
if not(status) then
|
if not(status) then
|
||||||
paq.sync();
|
paq.install();
|
||||||
end
|
end
|
||||||
|
|
||||||
local u = require("utils")
|
local u = require("utils")
|
||||||
@ -43,8 +46,8 @@ o.tabstop = 2
|
|||||||
o.shiftwidth = 2 -- Indents will have a width of 4
|
o.shiftwidth = 2 -- Indents will have a width of 4
|
||||||
o.softtabstop = 2 -- Sets the number of columns for a TAB
|
o.softtabstop = 2 -- Sets the number of columns for a TAB
|
||||||
o.expandtab = false -- Expand TABs to spaces
|
o.expandtab = false -- Expand TABs to spaces
|
||||||
vim.cmd [[set mouse=a]]
|
cmd [[set mouse=a]]
|
||||||
vim.cmd [[set undofile]]
|
cmd [[set undofile]]
|
||||||
|
|
||||||
-- Apply Theme
|
-- Apply Theme
|
||||||
o.syntax = "enable"
|
o.syntax = "enable"
|
||||||
@ -56,43 +59,32 @@ g.NERDTreeDirArrows = true
|
|||||||
g.hidden = true
|
g.hidden = true
|
||||||
g.material_theme_style = "ocean_community"
|
g.material_theme_style = "ocean_community"
|
||||||
|
|
||||||
if u.has_plugin("material") then
|
cmd [[colorscheme material]]
|
||||||
vim.cmd [[colorscheme material]]
|
|
||||||
end
|
|
||||||
-- Remove background color
|
-- Remove background color
|
||||||
vim.cmd [[highlight Normal guibg=none]]
|
cmd [[highlight Normal guibg=none]]
|
||||||
vim.cmd [[highlight NonText guibg=none]]
|
cmd [[highlight NonText guibg=none]]
|
||||||
|
|
||||||
-- KeyBindings
|
-- KeyBindings
|
||||||
g.mapleader = " "
|
g.mapleader = " "
|
||||||
require "keymappings"
|
require "keymappings"
|
||||||
|
|
||||||
-- Treesitter config
|
-- Treesitter config
|
||||||
if u.has_plugin("nvim-treesitter") then
|
require "nvim-treesitter.configs".setup {ensure_installed = "maintained", highlight = {enable = true}}
|
||||||
require "nvim-treesitter.configs".setup {ensure_installed = "maintained", highlight = {enable = true}}
|
|
||||||
end
|
|
||||||
-- Toggleterm / Lazygit setup
|
-- Toggleterm / Lazygit setup
|
||||||
if u.has_plugin("toggleterm") then
|
require "lazy-git"
|
||||||
require "lazy-git"
|
|
||||||
end
|
|
||||||
-- Autocommands
|
-- Autocommands
|
||||||
if u.has_plugin("NERDTree") then
|
u.create_augroup(
|
||||||
u.create_augroup(
|
{
|
||||||
{
|
{"VimEnter", "*", "if (@% == '') | NERDTree | endif"},
|
||||||
{"VimEnter", "*", "if (@% == '') | NERDTree | endif"},
|
{"BufEnter", "*", 'if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif'}
|
||||||
{"BufEnter", "*", 'if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif'}
|
},
|
||||||
},
|
"Nerdtree"
|
||||||
"Nerdtree"
|
)
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Autocompletion Setup
|
-- Autocompletion Setup
|
||||||
if u.has_plugin("compe") then
|
require "autocomplete"
|
||||||
require "autocomplete"
|
|
||||||
end
|
|
||||||
|
|
||||||
-- LSP Config
|
-- LSP Config
|
||||||
if u.has_plugin("lspconfig") then
|
|
||||||
|
|
||||||
require "lsp-utils"
|
require "lsp-utils"
|
||||||
|
|
||||||
@ -102,4 +94,3 @@ opt.shortmess:append({c = true})
|
|||||||
-- Autoformat
|
-- Autoformat
|
||||||
require "autoformatter"
|
require "autoformatter"
|
||||||
|
|
||||||
end
|
|
Loading…
Reference in New Issue
Block a user