mirror of
https://github.com/tomru/vim.git
synced 2026-03-03 06:27:18 +01:00
add all previous plugins and config
This commit is contained in:
15
lua/custom/plugins/filetree.lua
Normal file
15
lua/custom/plugins/filetree.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
vim.cmd [[ let g:neo_tree_remove_legacy_commands = 1 ]]
|
||||
|
||||
return {
|
||||
'nvim-neo-tree/neo-tree.nvim',
|
||||
version = '*',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
|
||||
'MunifTanjim/nui.nvim',
|
||||
},
|
||||
opts = {},
|
||||
keys = {
|
||||
{ '<leader>e', '<cmd>Neotree toggle<cr>', desc = 'NeoTree' },
|
||||
},
|
||||
}
|
||||
38
lua/custom/plugins/formatter.lua
Normal file
38
lua/custom/plugins/formatter.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
return {
|
||||
"mhartington/formatter.nvim",
|
||||
lazy = false,
|
||||
init = function()
|
||||
vim.api.nvim_create_augroup('_formatter', { clear = true });
|
||||
vim.api.nvim_create_autocmd('BufWritePost', {
|
||||
command = 'FormatWrite',
|
||||
group = '_formatter',
|
||||
})
|
||||
end,
|
||||
opts = function()
|
||||
local filetypes = require('formatter.filetypes')
|
||||
return {
|
||||
logging = false,
|
||||
log_level = vim.log.levels.WARN,
|
||||
filetype = {
|
||||
lua = {
|
||||
filetypes.lua.stylua,
|
||||
},
|
||||
javascript = {
|
||||
filetypes.javascript.eslint_d,
|
||||
},
|
||||
javascriptreact = {
|
||||
filetypes.javascript.eslint_d,
|
||||
},
|
||||
json = {
|
||||
filetypes.json.prettierd,
|
||||
},
|
||||
rust = {
|
||||
filetypes.rust.rustfmt,
|
||||
},
|
||||
['*'] = {
|
||||
filetypes.any.remove_trailing_whitespace,
|
||||
},
|
||||
},
|
||||
}
|
||||
end
|
||||
}
|
||||
10
lua/custom/plugins/rooter.lua
Normal file
10
lua/custom/plugins/rooter.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
return {
|
||||
'notjedi/nvim-rooter.lua',
|
||||
config = function()
|
||||
require('nvim-rooter').setup {
|
||||
rooter_patterns = { '.git', 'Makefile', '=bcr' },
|
||||
trigger_patterns = { '*' },
|
||||
manual = false,
|
||||
}
|
||||
end,
|
||||
}
|
||||
39
lua/custom/plugins/utils.lua
Normal file
39
lua/custom/plugins/utils.lua
Normal file
@@ -0,0 +1,39 @@
|
||||
return {
|
||||
'vim-utils/vim-troll-stopper',
|
||||
{'tpope/vim-abolish', lazy = false },
|
||||
{'tpope/vim-unimpaired', lazy = false },
|
||||
{
|
||||
'rcarriga/nvim-notify',
|
||||
lazy = false,
|
||||
config = function()
|
||||
local notify = require 'notify'
|
||||
notify.setup()
|
||||
vim.notify = notify
|
||||
end,
|
||||
},
|
||||
|
||||
-- rust
|
||||
{ 'simrat39/rust-tools.nvim', opt = {} },
|
||||
{
|
||||
'saecki/crates.nvim',
|
||||
requires = { 'nvim-lua/plenary.nvim' },
|
||||
opt = {}
|
||||
},
|
||||
|
||||
-- testing
|
||||
{
|
||||
'vim-test/vim-test',
|
||||
fn = { "javascript", "typescript", "javascriptreact" },
|
||||
config = function()
|
||||
vim.cmd([[
|
||||
let test#strategy = 'neovim'
|
||||
let test#javascript#jest#file_pattern = '\v(__tests__/.*|(spec|tests?))\.(js|jsx|coffee|ts|tsx)$'
|
||||
]])
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>tn", "<cmd>TestNearest<cr>", desc = "[T]est [N]earest" },
|
||||
{ "<leader>tf", "<cmd>TestFile<cr>", desc = "[T]est [F]ile" },
|
||||
{ "<leader>tt", "<cmd>TestLast<cr>", desc = "[T]est Last" },
|
||||
}
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user