Skip to content

Commit

Permalink
UPDATE: some plugins replaced because of their slowness
Browse files Browse the repository at this point in the history
  • Loading branch information
mthnglac committed Jun 5, 2021
1 parent 2b840e6 commit 6f0e84b
Show file tree
Hide file tree
Showing 16 changed files with 169 additions and 53 deletions.
4 changes: 2 additions & 2 deletions nvim/lua/general/commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Augroup.cmds({
-- highlight on yank!!!
highlight_yank = {
{"TextYankPost", "* silent! lua require'vim.highlight'.on_yank({timeout = 400})"};
};
},
-- its PROPERTY!!!
MTHNGLAC = {
{"BufWritePre", "* :call TrimWhitespace()"};
};
},
})
11 changes: 7 additions & 4 deletions nvim/lua/install-plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@ plug(tostring(os.getenv("HOME")) .. '/.vim/plugged', {
-- Treesitter
{'nvim-treesitter/nvim-treesitter', ['do'] = ':TSUpdate'},
'windwp/nvim-ts-autotag',
-- Telescope
-- Telescope & extensions
'nvim-telescope/telescope.nvim',
'nvim-lua/plenary.nvim',
'nvim-lua/popup.nvim',
'nvim-telescope/telescope-fzy-native.nvim',
'nvim-telescope/telescope-symbols.nvim',
'nvim-telescope/telescope-github.nvim',
'nvim-telescope/telescope-node-modules.nvim',
'fannheyward/telescope-coc.nvim',
-- web devicons
'kyazdani42/nvim-web-devicons',
-- Git - blamer
--'ttys3/nvim-blamer.lua',
Expand All @@ -55,12 +59,11 @@ plug(tostring(os.getenv("HOME")) .. '/.vim/plugged', {
-- manage virtualenv
'jmcantrell/vim-virtualenv',
-- file browser
'preservim/nerdtree',
'Xuyuanp/nerdtree-git-plugin',
'kyazdani42/nvim-tree.lua',
-- .gitignore plugin
'gisphm/vim-gitignore',
-- for showing git sign: inserted, modified, deleted vs..
'airblade/vim-gitgutter',
'lewis6991/gitsigns.nvim',
-- commenter
'preservim/nerdcommenter',
-- Insert or delete brackets, parens, quotes in pair.
Expand Down
3 changes: 3 additions & 0 deletions nvim/lua/plugins/colors/commands.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Command.cmd({
'colorscheme random',
})
1 change: 1 addition & 0 deletions nvim/lua/plugins/colors/init.lua
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
require('plugins.colors.functions')
require('plugins.colors.commands')
4 changes: 2 additions & 2 deletions nvim/lua/plugins/fterm-nvim/settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ local map = vim.api.nvim_set_keymap
local opts = { noremap = true, silent = true }

-- Closer to the metal
map('n', '<F12>', '<CMD>lua require("FTerm").toggle()<CR>', opts)
map('t', '<F12>', '<C-\\><C-n><CMD>lua require("FTerm").toggle()<CR>', opts)
map('n', '<F12>', '<Cmd>lua require("FTerm").toggle()<CR>', opts)
map('t', '<F12>', '<C-\\><C-n><Cmd>lua require("FTerm").toggle()<CR>', opts)
1 change: 1 addition & 0 deletions nvim/lua/plugins/git-signs-nvim/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require('plugins.git-signs-nvim.settings')
21 changes: 21 additions & 0 deletions nvim/lua/plugins/git-signs-nvim/settings.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
require('gitsigns').setup({
signs = {
add = { hl = 'GitSignsAdd', text = '', numhl = 'GitSignsAddNr', linehl = 'GitSignsAddLn' },
change = { hl = 'GitSignsChange', text = '', numhl = 'GitSignsChangeNr', linehl = 'GitSignsChangeLn' },
delete = { hl = 'GitSignsDelete', text = '_', numhl = 'GitSignsDeleteNr', linehl = 'GitSignsDeleteLn' },
topdelete = { hl = 'GitSignsDelete', text = '', numhl = 'GitSignsDeleteNr', linehl = 'GitSignsDeleteLn' },
changedelete = { hl = 'GitSignsChange', text = '~', numhl = 'GitSignsChangeNr', linehl = 'GitSignsChangeLn' },
},
numhl = false,
linehl = false,
keymaps = {},
watch_index = {
interval = 1000
},
current_line_blame = false,
sign_priority = 6,
update_debounce = 100,
status_formatter = nil, -- Use default
use_decoration_api = true,
use_internal_diff = true, -- If luajit is present
})
3 changes: 2 additions & 1 deletion nvim/lua/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ require('plugins.fugitive')
require('plugins.godot')
require('plugins.goyo')
require('plugins.git-blame')
require('plugins.git-signs-nvim')
require('plugins.prettier')
require('plugins.nerdtree')
require('plugins.nvim-tree')
require('plugins.nvim-treesitter')
require('plugins.undotree')
require('plugins.vim-smoothie')
Expand Down
3 changes: 0 additions & 3 deletions nvim/lua/plugins/nerdtree/init.lua

This file was deleted.

4 changes: 0 additions & 4 deletions nvim/lua/plugins/nerdtree/keybinds.lua

This file was deleted.

16 changes: 0 additions & 16 deletions nvim/lua/plugins/nerdtree/settings.lua

This file was deleted.

20 changes: 0 additions & 20 deletions nvim/lua/plugins/nerdtree/variables.lua

This file was deleted.

2 changes: 2 additions & 0 deletions nvim/lua/plugins/nvim-tree/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require('plugins.nvim-tree.variables')
require('plugins.nvim-tree.keybinds')
4 changes: 4 additions & 0 deletions nvim/lua/plugins/nvim-tree/keybinds.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- open file manager
Keybind.g({
{ 'n', '<Leader>pv', [[<Cmd>NvimTreeToggle<CR>]], { noremap = true, silent = true } },
})
120 changes: 120 additions & 0 deletions nvim/lua/plugins/nvim-tree/variables.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
Variable.g({
--left by default
nvim_tree_side = 'left',
--30 by default
--nvim_tree_width = 45,
nvim_tree_width = 45,
--empty by default
nvim_tree_ignore = {
'\\.pyc$',
'^__pycache__$',
'.git$[[dir]]',
'.swp',
'dist',
'tmp',
'node_modules',
'bower_components',
'.pnp',
'.cache',
},
--0 by default
nvim_tree_gitignore = 1,
--0 by default, opens the tree when typing `vim $DIR` or `vim`
nvim_tree_auto_open = 0,
--0 by default, closes the tree when it's the last window
nvim_tree_auto_close = 0,
--empty by default, don't auto open tree on specific filetypes.
nvim_tree_auto_ignore_ft = {'startify', 'dashboard'},
--0 by default, closes the tree when you open a file
nvim_tree_quit_on_open = 0,
--0 by default, this option allows the cursor to be updated when entering a buffer
nvim_tree_follow = 1,
--0 by default, this option shows indent markers when folders are open
nvim_tree_indent_markers = 1,
--0 by default, this option hides files and folders starting with a dot `.`
nvim_tree_hide_dotfiles = 1,
--0 by default, will enable file highlight for git attributes (can be used without the icons).
nvim_tree_git_hl = 1,
--0 by default, will enable folder and file icon highlight for opened files/directories.
nvim_tree_highlight_opened_files = 0,
--This is the default. See :help filename-modifiers for more options
nvim_tree_root_folder_modifier = ':~',
--0 by default, will open the tree when entering a new tab and the tree was previously open
nvim_tree_tab_open = 0,
--0 by default, will not resize the tree when opening a file
nvim_tree_width_allow_resize = 1,
--1 by default, disables netrw
nvim_tree_disable_netrw = 0,
--1 by default, prevents netrw from automatically opening when opening directories (but lets you keep its other utilities)
nvim_tree_hijack_netrw = 0,
--0 by default, append a trailing slash to folder names
nvim_tree_add_trailing = 1,
-- 0 by default, compact folders that only contain a single folder into one node in the file tree
nvim_tree_group_empty = 1,
--0 by default, will show lsp diagnostics in the signcolumn. See :help nvim_tree_lsp_diagnostics
nvim_tree_lsp_diagnostics = 0,
--0 by default, will disable the window picker.
nvim_tree_disable_window_picker = 1,
--1 by default, when moving cursor in the tree, will position the cursor at the start of the file on the current line
nvim_tree_hijack_cursor = 0,
-- Dictionary of buffer option names mapped to a list of option values that
-- indicates to the window picker that the buffer's window should not be
-- selectable.
nvim_tree_window_picker_exclude = {
['filetype'] = {
'packer',
'qf',
},
['buftype'] = {
'terminal',
}
},
--List of filenames that gets highlighted with NvimTreeSpecialFile
nvim_tree_special_files = {
'README.md',
'Makefile',
'MAKEFILE'
},
--If 0, do not show the icons for one of 'git' 'folder' and 'files'
--1 by default, notice that if 'files' is 1, it will only display
--if nvim-web-devicons is installed and on your runtimepath.
--if folder is 1, you can also tell folder_arrows 1 to show small arrows next to the folder icons.
--but this will not work when you set indent_markers (because of UI conflict)
nvim_tree_show_icons = {
['git'] = 1,
['folders'] = 1,
['files'] = 1,
['folder_arrows'] = 0,
},
--default will show icon by default if no icon is provided
--default shows no icon by default
nvim_tree_icons = {
['default'] = '',
['symlink'] = '',
['git'] = {
['unstaged'] = "",
['staged'] = "",
['unmerged'] = "",
['renamed'] = "",
['untracked'] = "",
['deleted'] = "",
['ignored'] = ""
},
['folder'] = {
['arrow_open'] = "",
['arrow_closed'] = "",
['default'] = "",
['open'] = "",
['empty'] = "",
['empty_open'] = "",
['symlink'] = "",
['symlink_open'] = "",
},
['lsp'] = {
['hint'] = "",
['info'] = "",
['warning'] = "",
['error'] = "",
}
}
})
5 changes: 4 additions & 1 deletion nvim/lua/plugins/telescope/settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,14 @@ require('telescope').setup({
fzy_native = {
override_generic_sorter = false,
override_file_sorter = true,
}
},
},
})

require('telescope').load_extension('fzy_native')
require('telescope').load_extension('gh')
require('telescope').load_extension('coc')
require('telescope').load_extension('node_modules')

local M = {}

Expand Down

0 comments on commit 6f0e84b

Please sign in to comment.