commit 91fee4797db86a6742ae041ce487798d0a6ad6b4
parent ea8595888ba0d4806f54c8655911fac909b9c8d0
Author: Tomas Nemec <nemi@skaut.cz>
Date: Wed, 3 Aug 2022 21:54:01 +0200
update
Diffstat:
7 files changed, 173 insertions(+), 160 deletions(-)
diff --git a/after/plugin/leap.lua b/after/plugin/leap.lua
@@ -1,4 +1,6 @@
-if not pcall(require, 'leap') then return end
+if not pcall(require, 'leap') then
+ return
+end
local leap = require('leap')
leap.setup({ case_sensitive = false, highlight_unlabeled = true, max_aot_targets = nil })
@@ -26,20 +28,29 @@ leap.set_default_keymaps()
vim.keymap.set('n', 'gw', '<Plug>(leap-cross-window)')
if pcall(require, 'tms.p.leap.ast') then
- vim.keymap.set({ 'n', 'x', 'o' }, 'gp', function() require('tms.p.leap.ast').parent() end,
- { desc = 'Leap AST Parent' })
+ vim.keymap.set({ 'n', 'x', 'o' }, 'gp', function()
+ require('tms.p.leap.ast').parent()
+ end, { desc = 'Leap AST Parent' })
- local leap_ast_group = vim.api.nvim_create_augroup('leap-ast', { clear = true })
+ local leap_ast_group = vim.api.nvim_create_augroup('leap-ast', {})
vim.api.nvim_create_autocmd('User', {
group = leap_ast_group,
pattern = 'LeapEnter',
- callback = function() if require('leap').state.args.ast then ast_highlights() end end,
+ callback = function()
+ if require('leap').state.args.ast then
+ ast_highlights()
+ end
+ end,
desc = 'Default -> Ast highlights',
})
vim.api.nvim_create_autocmd('User', {
group = leap_ast_group,
pattern = 'LeapLeave',
- callback = function() if require('leap').state.args.ast then default_highlights() end end,
+ callback = function()
+ if require('leap').state.args.ast then
+ default_highlights()
+ end
+ end,
desc = 'AST -> Default highlights',
})
end
diff --git a/init.lua b/init.lua
@@ -2,3 +2,6 @@ vim.g.mapleader = ','
require('tms.first_load')
require('impatient')
require('colorbuddy').colorscheme('tms')
+require('tms.options')
+require('tms.keymap')
+require('tms.autocmd')
diff --git a/lua/plugins.lua b/lua/plugins.lua
@@ -0,0 +1,153 @@
+vim.cmd [[packadd packer.nvim]]
+local packer = require('packer')
+return packer.startup({
+ function()
+ local use = packer.use
+
+ packer.use_rocks('luautf8')
+ -- packer.use_rocks('lyaml')
+
+ use { 'wbthomason/packer.nvim', opt = true }
+
+ -- meta
+ use { 'tweekmonster/startuptime.vim' }
+ use { 'nathom/filetype.nvim' }
+ use { 'lewis6991/impatient.nvim' }
+
+ -- colorscheme
+ use { 'tjdevries/colorbuddy.nvim' }
+
+ -- spell
+ use 'xxdavid/bez-diakritiky.vim'
+
+ -- movements
+ use { 'ggandor/leap.nvim' }
+
+ -- editor
+ use 'tpope/vim-repeat'
+ use 'kylechui/nvim-surround'
+ use 'chaoren/vim-wordmotion' -- word counts with _,.,-,...
+ use 'romgrk/equal.operator' -- equal text object `lefthand = righthand`
+ use 'godlygeek/tabular' -- align
+ use 'luukvbaal/stabilize.nvim'
+ -- use 'windwp/nvim-autopairs'
+ use 'numToStr/Comment.nvim'
+ use 'mbbill/undotree'
+ use 'camspiers/animate.vim'
+ use 'norcalli/nvim-colorizer.lua'
+ use 'rainbowhxch/beacon.nvim'
+ -- use 'Yggdroot/hiPairs'
+ use 'jandamm/cryoline.nvim'
+ use 'karb94/neoscroll.nvim'
+ use { 'sidebar-nvim/sidebar.nvim', requires = { 'kyazdani42/nvim-web-devicons' } }
+
+ -- lua
+ use 'nanotee/luv-vimdocs'
+ use 'milisims/nvim-luaref'
+
+ -- Notes
+ use { 'nvim-neorg/neorg', requires = { 'nvim-lua/plenary.nvim' } }
+ use { 'mickael-menu/zk-nvim', requires = { 'neovim/nvim-lspconfig' } }
+
+ -- quickfix list
+ use 'kevinhwang91/nvim-bqf'
+
+ -- distraction
+ use 'junegunn/limelight.vim'
+ use 'Pocco81/true-zen.nvim'
+
+ -- how to vim
+ use 'ThePrimeagen/vim-be-good'
+
+ -- vcs
+ use { 'lewis6991/gitsigns.nvim', requires = { 'nvim-lua/plenary.nvim' } }
+ use 'sindrets/diffview.nvim'
+ use 'tpope/vim-fugitive'
+ use { 'ipod825/igit.nvim', requires = { 'nvim-lua/plenary.nvim', 'ipod825/libp.nvim' } }
+ use 'rhysd/git-messenger.vim'
+ use 'ThePrimeagen/git-worktree.nvim'
+ use 'rhysd/conflict-marker.vim'
+
+ -- http
+ use { 'NTBBloodbath/rest.nvim', requires = { 'nvim-lua/plenary.nvim' } }
+
+ -- tasks
+ use 'amirrezaask/actions.nvim'
+
+ -- filetype
+ use 'tikhomirov/vim-glsl'
+ use 'windwp/nvim-ts-autotag'
+ use 'baskerville/vim-sxhkdrc'
+ use 'dart-lang/dart-vim-plugin'
+ use 'mfussenegger/nvim-jdtls'
+ -- use 'akinsho/pubspec-assist.nvim'
+ -- snippets
+ use 'L3MON4D3/luaSnip'
+
+ -- completion
+ use {
+ 'hrsh7th/nvim-cmp',
+ requires = {
+ 'hrsh7th/cmp-buffer',
+ 'hrsh7th/cmp-nvim-lsp',
+ 'hrsh7th/cmp-path',
+ 'hrsh7th/cmp-cmdline',
+ 'hrsh7th/cmp-nvim-lua',
+ 'f3fora/cmp-spell',
+ 'hrsh7th/cmp-calc',
+ 'ray-x/cmp-treesitter',
+ 'uga-rosa/cmp-dictionary',
+ 'saadparwaiz1/cmp_luasnip',
+ },
+ }
+
+ -- ui
+ use 'stevearc/dressing.nvim'
+ use 'rcarriga/nvim-notify'
+
+ -- lsp
+ use 'neovim/nvim-lspconfig'
+ use 'williamboman/mason.nvim'
+ use 'williamboman/mason-lspconfig.nvim'
+ use 'b0o/schemastore.nvim'
+ use 'folke/lua-dev.nvim'
+ use { 'jose-elias-alvarez/null-ls.nvim', requires = { 'nvim-lua/plenary.nvim' } }
+ use 'stevearc/aerial.nvim'
+
+ -- dap
+ use 'mfussenegger/nvim-dap'
+ use 'leoluz/nvim-dap-go'
+ use 'rcarriga/nvim-dap-ui'
+ use 'theHamsta/nvim-dap-virtual-text'
+
+ -- treesitter
+ use 'nvim-treesitter/nvim-treesitter'
+ use 'nvim-treesitter/nvim-treesitter-textobjects'
+ use 'nvim-treesitter/nvim-treesitter-refactor'
+ use 'nvim-treesitter/playground'
+ use 'JoosepAlviste/nvim-ts-context-commentstring'
+ use 'lewis6991/nvim-treesitter-context'
+
+ -- telescope
+ use {
+ 'nvim-telescope/telescope.nvim',
+ requires = { 'nvim-lua/popup.nvim', 'nvim-lua/plenary.nvim', 'kyazdani42/nvim-web-devicons' },
+ }
+ use 'nvim-telescope/telescope-packer.nvim'
+ use 'nvim-telescope/telescope-fzy-native.nvim'
+ use 'nvim-telescope/telescope-dap.nvim'
+ use 'nvim-telescope/telescope-media-files.nvim'
+
+ -- Godot
+ use 'habamax/vim-godot'
+
+ -- personal
+ use 'GenesisTMS/trans.nvim'
+ use '~/dev/nvim/plugins/dartls-helper'
+
+ -- database
+ use 'tpope/vim-dadbod'
+ use 'kristijanhusak/vim-dadbod-ui'
+ use 'kristijanhusak/vim-dadbod-completion'
+ end,
+})
diff --git a/plugin/autocmd.lua b/lua/tms/autocmd.lua
diff --git a/plugin/keymap.lua b/lua/tms/keymap.lua
diff --git a/plugin/options.lua b/lua/tms/options.lua
diff --git a/lua/tms/plugins.lua b/lua/tms/plugins.lua
@@ -1,154 +0,0 @@
-vim.cmd [[packadd packer.nvim]]
-local packer = require('packer')
-return packer.startup({
- function()
- local use = packer.use
-
- packer.use_rocks('luautf8')
- -- packer.use_rocks('lyaml')
-
- use { 'wbthomason/packer.nvim', opt = true }
-
- -- meta
- use { 'tweekmonster/startuptime.vim' }
- use { 'nathom/filetype.nvim' }
- use { 'lewis6991/impatient.nvim' }
-
- -- colorscheme
- use { 'tjdevries/colorbuddy.nvim' }
-
- -- spell
- use 'xxdavid/bez-diakritiky.vim'
-
- -- movements
- use { 'ggandor/leap.nvim' }
-
- -- editor
- use 'tpope/vim-repeat'
- use 'kylechui/nvim-surround'
- use 'chaoren/vim-wordmotion' -- word counts with _,.,-,...
- use 'romgrk/equal.operator' -- equal text object `lefthand = righthand`
- use 'godlygeek/tabular' -- align
- use 'luukvbaal/stabilize.nvim'
- -- use 'windwp/nvim-autopairs'
- use 'numToStr/Comment.nvim'
- use 'mbbill/undotree'
- use 'camspiers/animate.vim'
- use 'norcalli/nvim-colorizer.lua'
- use 'rainbowhxch/beacon.nvim'
- -- use 'Yggdroot/hiPairs'
- use 'jandamm/cryoline.nvim'
- use 'karb94/neoscroll.nvim'
- use 'windwp/nvim-spectre'
- use { 'sidebar-nvim/sidebar.nvim', requires = { 'kyazdani42/nvim-web-devicons' } }
-
- -- lua
- use 'nanotee/luv-vimdocs'
- use 'milisims/nvim-luaref'
-
- -- Notes
- use { 'nvim-neorg/neorg', requires = { 'nvim-lua/plenary.nvim' } }
- use { 'mickael-menu/zk-nvim', requires = { 'neovim/nvim-lspconfig' } }
-
- -- quickfix list
- use 'kevinhwang91/nvim-bqf'
-
- -- distraction
- use 'junegunn/limelight.vim'
- use 'Pocco81/true-zen.nvim'
-
- -- how to vim
- use 'ThePrimeagen/vim-be-good'
-
- -- vcs
- use { 'lewis6991/gitsigns.nvim', requires = { 'nvim-lua/plenary.nvim' } }
- use 'sindrets/diffview.nvim'
- use 'tpope/vim-fugitive'
- use { 'ipod825/igit.nvim', requires = { 'nvim-lua/plenary.nvim', 'ipod825/libp.nvim' } }
- use 'rhysd/git-messenger.vim'
- use 'ThePrimeagen/git-worktree.nvim'
- use 'rhysd/conflict-marker.vim'
-
- -- http
- use { 'NTBBloodbath/rest.nvim', requires = { 'nvim-lua/plenary.nvim' } }
-
- -- tasks
- use 'amirrezaask/actions.nvim'
-
- -- filetype
- use 'tikhomirov/vim-glsl'
- use 'windwp/nvim-ts-autotag'
- use 'baskerville/vim-sxhkdrc'
- use 'dart-lang/dart-vim-plugin'
- use 'mfussenegger/nvim-jdtls'
- -- use 'akinsho/pubspec-assist.nvim'
- -- snippets
- use 'L3MON4D3/luaSnip'
-
- -- completion
- use {
- 'hrsh7th/nvim-cmp',
- requires = {
- 'hrsh7th/cmp-buffer',
- 'hrsh7th/cmp-nvim-lsp',
- 'hrsh7th/cmp-path',
- 'hrsh7th/cmp-cmdline',
- 'hrsh7th/cmp-nvim-lua',
- 'f3fora/cmp-spell',
- 'hrsh7th/cmp-calc',
- 'ray-x/cmp-treesitter',
- 'uga-rosa/cmp-dictionary',
- 'saadparwaiz1/cmp_luasnip',
- },
- }
-
- -- ui
- use 'stevearc/dressing.nvim'
- use 'rcarriga/nvim-notify'
-
- -- lsp
- use 'neovim/nvim-lspconfig'
- use 'williamboman/mason.nvim'
- use 'williamboman/mason-lspconfig.nvim'
- use 'b0o/schemastore.nvim'
- use 'folke/lua-dev.nvim'
- use { 'jose-elias-alvarez/null-ls.nvim', requires = { 'nvim-lua/plenary.nvim' } }
- use 'stevearc/aerial.nvim'
-
- -- dap
- use 'mfussenegger/nvim-dap'
- use 'leoluz/nvim-dap-go'
- use 'rcarriga/nvim-dap-ui'
- use 'theHamsta/nvim-dap-virtual-text'
-
- -- treesitter
- use 'nvim-treesitter/nvim-treesitter'
- use 'nvim-treesitter/nvim-treesitter-textobjects'
- use 'nvim-treesitter/nvim-treesitter-refactor'
- use 'nvim-treesitter/playground'
- use 'JoosepAlviste/nvim-ts-context-commentstring'
- use 'lewis6991/nvim-treesitter-context'
-
- -- telescope
- use {
- 'nvim-telescope/telescope.nvim',
- requires = { 'nvim-lua/popup.nvim', 'nvim-lua/plenary.nvim', 'kyazdani42/nvim-web-devicons' },
- }
- use 'nvim-telescope/telescope-packer.nvim'
- use 'nvim-telescope/telescope-fzy-native.nvim'
- use 'nvim-telescope/telescope-dap.nvim'
- use 'nvim-telescope/telescope-media-files.nvim'
-
- -- Godot
- use 'habamax/vim-godot'
-
- -- personal
- use 'GenesisTMS/trans.nvim'
- use '~/dev/nvim/plugins/dartls-helper'
-
- -- database
- use 'tpope/vim-dadbod'
- use 'kristijanhusak/vim-dadbod-ui'
- use 'kristijanhusak/vim-dadbod-completion'
- end,
-})