remove some unued plugins

This commit is contained in:
max_richter 2021-10-08 11:16:06 +02:00
parent 1bfb07f1e1
commit abf32b26c3
5 changed files with 20 additions and 73 deletions

View File

@ -19,7 +19,6 @@ paq:setup({verbose = true}) {
--"unkiwii/vim-nerdtree-sync", --"unkiwii/vim-nerdtree-sync",
"kyazdani42/nvim-web-devicons", "kyazdani42/nvim-web-devicons",
"kyazdani42/nvim-tree.lua", "kyazdani42/nvim-tree.lua",
"karb94/neoscroll.nvim",
"alexghergh/nvim-tmux-navigation", "alexghergh/nvim-tmux-navigation",
-- Code Navigation -- Code Navigation
"dense-analysis/ale", "dense-analysis/ale",
@ -45,7 +44,7 @@ paq:setup({verbose = true}) {
"L3MON4D3/LuaSnip", -- Snippets plugin "L3MON4D3/LuaSnip", -- Snippets plugin
{"nvim-treesitter/nvim-treesitter", run = ":TSUpdate"}, {"nvim-treesitter/nvim-treesitter", run = ":TSUpdate"},
-- Formatting -- Formatting
"mhartington/formatter.nvim", --"mhartington/formatter.nvim",
-- Git Interface -- Git Interface
"akinsho/nvim-toggleterm.lua", "akinsho/nvim-toggleterm.lua",
-- Database Interface -- Database Interface
@ -56,10 +55,11 @@ paq:setup({verbose = true}) {
if u.has_plugin("cmp") then if u.has_plugin("cmp") then
-- Global options -- Global options
o.number = true o.number = true
o.tabstop = 2 o.tabstop = 8
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 -- Dont expand TABs to spaces
o.autoindent = true
cmd [[set mouse=a]] cmd [[set mouse=a]]
cmd [[set undofile]] cmd [[set undofile]]
cmd [[set fcs=eob:\ ]] cmd [[set fcs=eob:\ ]]
@ -206,9 +206,6 @@ if u.has_plugin("cmp") then
} }
) )
-- Smooth Scrolling
require("neoscroll").setup()
-- Autocompletion Setup -- Autocompletion Setup
o.completeopt = "menuone,noselect" o.completeopt = "menuone,noselect"
require "autocomplete" require "autocomplete"
@ -217,9 +214,7 @@ if u.has_plugin("cmp") then
require "lspinstall".setup() require "lspinstall".setup()
require "lsp-utils" require "lsp-utils"
-- Autoformat
require "autoformatter"
else else
paq.install() paq.install()
cmd [[source $MYVIMRC]] u.ReloadConfig()
end end

View File

@ -1,58 +0,0 @@
local u = require "utils"
-- Config Formatter
u.create_augroup(
{
--{"BufWritePost", "*.js,*.jsx,*.ts,*.tsx,*.rs,*.svelte", "OrganizeImports"},
{"BufWritePost", "*.js,*.jsx,*.ts,*.tsx,*.rs,*.lua", "FormatWrite"}
},
"FormatAutogroup"
)
require("formatter").setup(
{
logging = false,
filetype = {
typescript = {
-- prettier
function()
return {
exe = "prettier",
args = {"--stdin-filepath", vim.api.nvim_buf_get_name(0), "--single-quote"},
stdin = true
}
end
},
javascript = {
-- prettier
function()
return {
exe = "prettier",
args = {"--stdin-filepath", vim.api.nvim_buf_get_name(0), "--single-quote"},
stdin = true
}
end
},
svelte = {
-- prettier
function()
return {
exe = "prettier",
args = {"--stdin-filepath", vim.api.nvim_buf_get_name(0), "--single-quote"},
stdin = true
}
end
},
lua = {
-- luafmt
function()
return {
exe = "luafmt",
args = {"--indent-count", 2, "--stdin"},
stdin = true
}
end
}
}
}
)

View File

@ -1,4 +1,5 @@
local Terminal = require("toggleterm.terminal").Terminal local Terminal = require("toggleterm.terminal").Terminal
local u = require("utils")
local lazygit = local lazygit =
Terminal:new( Terminal:new(
{ {
@ -51,7 +52,7 @@ local nvimConfig =
direction = "float", direction = "float",
on_close = function(term) on_close = function(term)
Terminal:close() Terminal:close()
vim.api.nvim_command(":source $MYVIMRC") u.ReloadConfig()
end end
} }
) )

View File

@ -41,8 +41,7 @@ local function on_attach(client)
autocmd! * <buffer> autocmd! * <buffer>
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight() autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references() autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
" autocmd CursorHold *.* :lua vim.lsp.diagnostic.show_line_diagnostics() autocmd CursorHold *.* :lua vim.lsp.diagnostic.show_line_diagnostics()
autocmd BufWritePre * lua vim.lsp.buf.formatting_sync(nil, 300)
augroup END augroup END
]], ]],
false false

View File

@ -10,6 +10,16 @@ function M.create_augroup(autocmds, name)
cmd('augroup END') cmd('augroup END')
end end
function M.ReloadConfig()
for name,_ in pairs(package.loaded) do
if name:match('^cnull') then
package.loaded[name] = nil
end
end
dofile(vim.env.MYVIMRC)
end
local function dump(o) local function dump(o)
if type(o) == 'table' then if type(o) == 'table' then
local s = '{ ' local s = '{ '