Skip to content

Commit

Permalink
oboro => [plugins.lua][lspsaga.lua][treesitter.lua]
Browse files Browse the repository at this point in the history
  • Loading branch information
mendess committed Jun 25, 2024
1 parent a0d3b64 commit 7080fe2
Show file tree
Hide file tree
Showing 3 changed files with 138 additions and 137 deletions.
251 changes: 123 additions & 128 deletions runes/nvim/lua/plugins.lua
Original file line number Diff line number Diff line change
@@ -1,210 +1,214 @@
local fn = vim.fn
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)

vim.cmd [[
augroup packer_user_config
autocmd!
autocmd BufWritePost plugins.lua source <afile> | PackerCompile
augroup end
]]

return require('packer').startup({function(use)
return require('lazy').setup({
------ ====== META ====== ------
-- manager manages itself
use 'wbthomason/packer.nvim'
-- mappings api
use 'b0o/mapx.nvim'
'b0o/mapx.nvim',
-- profiling
use {'tweekmonster/startuptime.vim', disable = true }
{'tweekmonster/startuptime.vim', enabled = false },
-- improve startup time
use {
{
'nathom/filetype.nvim',
config = function()
require('filetype').setup {
overrides = {
extensions = {
spell = 'sh',
hbs = 'html',
h = 'c',
pde = 'arduino',
ino = 'arduino',
},
literal = {
xinitrc = 'sh'
}
opts = {
overrides = {
extensions = {
spell = 'sh',
hbs = 'html',
h = 'c',
pde = 'arduino',
ino = 'arduino',
},
literal = {
xinitrc = 'sh'
}
}
end,
}
}
},
------ ============================= ------

------ ====== COLOR SCHEMES ====== ------
use 'mendess/nvim-base16.lua'
use 'mendess/ayu-vim'
use 'sainnhe/everforest'
use 'rebelot/kanagawa.nvim'
'mendess/nvim-base16.lua',
'mendess/ayu-vim',
'sainnhe/everforest',
'rebelot/kanagawa.nvim',
------ ============================= ------


------ ====== EXTRA KEYBINDS ====== ------
-- quick quoting/unquoting/swap quoting keybinds
use 'tpope/vim-surround'
'tpope/vim-surround',
-- quick comment keybind
use 'tpope/vim-commentary'
'tpope/vim-commentary',
------ ============================= ------


------ ====== INSIGHT ====== ------
-- File browser
use {
{
'nvim-neo-tree/neo-tree.nvim',
branch = "v2.x",
requires = {
dependencies = {
'nvim-lua/plenary.nvim',
'MunifTanjim/nui.nvim'
},
config = function()
vim.cmd [[ let g:neo_tree_remove_legacy_commands = 1 ]]
require('neo-tree').setup({
close_if_last_window = true,
default_component_configs = {
icon = {
folder_closed = "▶️",
folder_open = "v",
folder_empty = "▶️",
default = " ",
},
name = {
trailing_slash = true,
},
git_status = {
symbols = {
modified = "M",
untracked = "",
ignored = "I",
unstaged = "U",
staged = "S",
conflict = "C",
},
},
init = function()
vim.g.neo_tree_remove_legacy_commands = 1
end,
opts = {
close_if_last_window = true,
default_component_configs = {
icon = {
folder_closed = "▶️",
folder_open = "v",
folder_empty = "▶️",
default = " ",
},
filesystem = {
follow_current_file = true,
name = {
trailing_slash = true,
},
buffers = {
follow_current_file = true,
git_status = {
symbols = {
modified = "M",
untracked = "",
ignored = "I",
unstaged = "U",
staged = "S",
conflict = "C",
},
},
})
end
}
},
filesystem = {
follow_current_file = true,
},
buffers = {
follow_current_file = true,
},
}
},
-- git keybinds
use {
{
'airblade/vim-gitgutter',
config = function() vim.g.gitgutter_enabled = 0 end,
}
},
-- detect bad whitespace
use {
{
'ntpeters/vim-better-whitespace',
setup = function()
init = function()
vim.g.better_whitespace_enabled = false
vim.g.better_whitespace_filetypes_blacklist={
'neo-tree', 'diff', 'git', 'gitcommit', 'unite', 'qf', 'help', 'markdown', 'fugitive'
}
end,
}
},
-- highlight select text for a bit
use {
{
'machakann/vim-highlightedyank',
config = function() vim.g.highlightedyank_highlight_duration = 100 end
}
use 'tversteeg/registers.nvim'
init = function() vim.g.highlightedyank_highlight_duration = 100 end
},
'tversteeg/registers.nvim',
------ ============================= ------


------ ====== QUALITY OF LIFE ====== ------
-- auto close delimiters
use 'cohama/lexima.vim'
'cohama/lexima.vim',
-- auto close html tags
use 'alvan/vim-closetag'
'alvan/vim-closetag',
-- better .
use 'tpope/vim-repeat'
'tpope/vim-repeat',
-- make vim understand tables
use 'godlygeek/tabular'
'godlygeek/tabular',
------ ============================= ------


------ ====== IDE ====== ------
-- language server
use {
{
'neovim/nvim-lspconfig',
after = 'nvim-cmp',
dependencies = {'nvim-cmp'},
event = "InsertEnter",
config = function() require('plugins.lsp-config') end,
}
},
-- syntax highlighting
use {
{
'sheerun/vim-polyglot',
setup = function()
init = function()
vim.g.polyglot_disabled = {'sensible', 'autoindent'}
end,
}
},

'evanleck/vim-svelte',

use 'evanleck/vim-svelte'
'waycrate/swhkd-vim',

use 'waycrate/swhkd-vim'
'cstrahan/vim-capnp',

use 'cstrahan/vim-capnp'
{
'nvim-treesitter/nvim-treesitter',
config = function()
require('plugins.treesitter')
end,
},
-- pweatty lsp frontend
use {
{
'nvimdev/lspsaga.nvim',
after = "nvim-lspconfig",
dependencies = {"nvim-lspconfig"},
config = function() require('plugins.lspsaga') end,
}
},
-- completion
use {
{
'hrsh7th/nvim-cmp',
requires = {
dependencies = {
'hrsh7th/cmp-nvim-lsp',
{'hrsh7th/cmp-buffer', after = 'nvim-cmp' },
{'hrsh7th/cmp-path', after = 'nvim-cmp' },
{'hrsh7th/cmp-nvim-lua', after = 'nvim-cmp' },
{'hrsh7th/vim-vsnip', after = 'nvim-cmp' },
{'hrsh7th/cmp-vsnip', after = 'vim-vsnip' },
{'hrsh7th/cmp-emoji', after = 'nvim-cmp' },
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-path',
'hrsh7th/cmp-nvim-lua',
'hrsh7th/vim-vsnip',
{'hrsh7th/cmp-vsnip', dependencies = {'vim-vsnip'} },
'hrsh7th/cmp-emoji',
},
config = function() require('plugins.cmp') end,
event = "VimEnter *"
}
},
-- fuzzy finder
use {
{
'nvim-telescope/telescope.nvim',
requires = {
dependencies = {
'nvim-lua/popup.nvim',
'nvim-lua/plenary.nvim',
},
config = function() require('plugins.telescope') end,
module = {'telescope', 'telescope.builtin'},
}
},
------ ============================= ------

------ ====== EXTRA SINTAX ====== ------
-- Rust
use {
{
'rust-lang/rust.vim',
ft = { 'rust' }
}
use {
},
{
'lukas-reineke/headlines.nvim',
config = function()
require('headlines').setup()
end,
disable = true,
}
use {
enabled = false,
},
{
'fatih/vim-go',
config = function()
init = function()
vim.g.go_fmt_autosave = 0
vim.g.go_fmt_fail_silently = 0
vim.g.go_mod_fmt_autosave = 0
Expand All @@ -223,17 +227,8 @@ return require('packer').startup({function(use)
vim.g.go_highlight_extra_types = 1
vim.g.go_highlight_build_constraints = 1
end,
}
------ ============================= ------

end,
config = {
display = {
open_fn = require('packer.util').float
},
}})

-- Plug('chrisbra/unicode.vim')

-- Plug('chrisbra/csv.vim')

------ ============================= ------
}, {
lazy = true,
})
15 changes: 6 additions & 9 deletions runes/nvim/lua/plugins/lspsaga.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ saga.setup({
lightbulb = { enable = false },
})

mapx.group({ silent = true }, function()
nnoremap('K', ':Lspsaga hover_doc<CR>')
-- inoremap('<C-j>', signature_help)
nnoremap('gh', ':Lspsaga finder<CR>')
nnoremap('[e', ':Lspsaga diagnostic_jump_prev<CR>')
nnoremap(']e', ':Lspsaga diagnostic_jump_next<CR>')
nnoremap('<leader>c', ':Lspsaga rename<CR>')
nnoremap('<A-Return>', ':Lspsaga code_action<CR>')
end)
vim.keymap.set('n', 'K', '<cmd>Lspsaga hover_doc<CR>')
vim.keymap.set('n', 'gh', '<cmd>Lspsaga finder<CR>')
vim.keymap.set('n', '[e', '<cmd>Lspsaga diagnostic_jump_prev<CR>')
vim.keymap.set('n', ']e', '<cmd>Lspsaga diagnostic_jump_next<CR>')
vim.keymap.set('n', '<leader>c', '<cmd>Lspsaga rename<CR>')
vim.keymap.set('n', '<A-Return>', '<cmd>Lspsaga code_action<CR>')
9 changes: 9 additions & 0 deletions runes/nvim/lua/plugins/treesitter.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require('nvim-treesitter.configs').setup({
ensure_installed = { "lua", "vim", "vimdoc", "markdown", "markdown_inline" },

sync_install = false,
auto_install = false,
highlight = {
enable = false,
}
})

0 comments on commit 7080fe2

Please sign in to comment.