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

View File

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

View File

@ -10,6 +10,16 @@ function M.create_augroup(autocmds, name)
cmd('augroup 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)
if type(o) == 'table' then
local s = '{ '