aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAriel D'Alessandro <ariel.dalessandro@auto1.com>2022-03-11 16:00:03 +0100
committerAriel D'Alessandro <ariel.dalessandro@auto1.com>2022-03-11 16:00:03 +0100
commit4e8faf60d8d608f81c74848d7dab5e87efb9fe2b (patch)
tree9f5e5d0103d8e8b38abaa32fb5543d7dfce46db4
parente753326bfde9937a879794eac178864df1c2272b (diff)
downloadnvim-conf-4e8faf60d8d608f81c74848d7dab5e87efb9fe2b.tar.gz
nvim-conf-4e8faf60d8d608f81c74848d7dab5e87efb9fe2b.zip
update config a bit, add trouble key and work tree
-rw-r--r--after/plugin/trouble.lua9
-rw-r--r--lua/alpha/plugins.lua7
-rw-r--r--lua/alpha/telescope/init.lua4
-rw-r--r--lua/alpha/telescope/mappings.lua1
4 files changed, 14 insertions, 7 deletions
diff --git a/after/plugin/trouble.lua b/after/plugin/trouble.lua
new file mode 100644
index 0000000..2fbb23d
--- /dev/null
+++ b/after/plugin/trouble.lua
@@ -0,0 +1,9 @@
+local ok, trouble = pcall(require, "trouble")
+
+if not ok then
+ return
+end
+
+trouble.setup {}
+
+vim.keymap.set('n', '<leader>tt', ':TroubleToggle<cr>')
diff --git a/lua/alpha/plugins.lua b/lua/alpha/plugins.lua
index 9c22d5c..1e6e196 100644
--- a/lua/alpha/plugins.lua
+++ b/lua/alpha/plugins.lua
@@ -154,13 +154,6 @@ return require('packer').startup(function(use)
use {
"folke/trouble.nvim",
requires = "kyazdani42/nvim-web-devicons",
- config = function()
- require("trouble").setup {
- -- your configuration comes here
- -- or leave it empty to use the default settings
- -- refer to the configuration section below
- }
- end
}
use 'dracula/vim'
diff --git a/lua/alpha/telescope/init.lua b/lua/alpha/telescope/init.lua
index 99a74e3..9092425 100644
--- a/lua/alpha/telescope/init.lua
+++ b/lua/alpha/telescope/init.lua
@@ -67,6 +67,10 @@ function M.projectionist ()
return require("telescope").extensions.projectionist.projectionist()
end
+function M.git_worktree ()
+ return require("telescope").extensions.git_worktree.git_worktrees()
+end
+
function M.laravel ()
vim.env.NO_TTY = 1
return require("telescope").extensions.laravel.laravel()
diff --git a/lua/alpha/telescope/mappings.lua b/lua/alpha/telescope/mappings.lua
index 8ffc15a..9acf5a6 100644
--- a/lua/alpha/telescope/mappings.lua
+++ b/lua/alpha/telescope/mappings.lua
@@ -35,6 +35,7 @@ map_tele("<leader>pe", "buffers")
map_tele("<leader>pr", "treesitter")
map_tele("<leader>bb", "file_browser")
map_tele("<leader>gs", "git_status")
+map_tele("<leader>gt", "git_worktree")
map_tele("<leader>ve", "diagnostics")
map_tele("<leader>fp", "my_plugins")