From 43f4a1a189af7ad8087377058ca1e5aabc887cd6 Mon Sep 17 00:00:00 2001 From: Biser Stoilov Date: Thu, 6 Jan 2022 22:12:08 +0200 Subject: [PATCH] Addedd new plugins --- README.md | 36 +++++++++++----------- help/lvim_bindings_normal_mode.md | 2 +- help/lvim_bindings_visual_mode.md | 2 -- lua/configs/global/init.lua | 2 ++ lua/configs/global/keymaps.lua | 2 +- lua/core/funcs.lua | 8 +++++ lua/modules/global/configs/editor/init.lua | 18 ++++++----- lua/modules/global/configs/ui/init.lua | 10 ++++-- lua/modules/global/init.lua | 12 ++++++-- 9 files changed, 57 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 53aa15ad..f8af4410 100644 --- a/README.md +++ b/README.md @@ -12,17 +12,17 @@ ## LVIM IDE is a modular Neovim configuration written in LUA with full customization -- Now support Neovim 0.6.0, 0.7.0+ -- Add or remove plugins, rewrite all plugins -- Add or remove settings, rewrite all settings -- Dynamic LSP activation -- Dynamic debugging activation - Dap -- Automaticaly install of the lsp servers and dap -- Linters -- Autoformat -- Custom settings for projects -- 70 plugins -- Loading time - ~065.000 +- Now support Neovim 0.6.0, 0.7.0+ +- Add or remove plugins, rewrite all plugins +- Add or remove settings, rewrite all settings +- Dynamic LSP activation +- Dynamic debugging activation - Dap +- Automaticaly install of the lsp servers and dap +- Linters +- Autoformat +- Custom settings for projects +- 73 plugins +- Loading time - ~086.000 --- @@ -36,13 +36,13 @@ For detail info see [wiki](https://github.com/lvim-tech/lvim/wiki) - `6500+` lin ## Requirements -- [neovim >=0.6.0](https://github.com/neovim/neovim/wiki/Installing-Neovim) -- [pynvim](https://github.com/neovim/pynvim) -- [neovim-remote](https://github.com/mhinz/neovim-remote) -- [nodejs](https://nodejs.org/en/) -- [ripgrep](https://github.com/BurntSushi/ripgrep) -- [fzf](https://github.com/junegunn/fzf) -- [rsync](https://github.com/WayneD/rsync) +- [neovim >=0.6.0](https://github.com/neovim/neovim/wiki/Installing-Neovim) +- [pynvim](https://github.com/neovim/pynvim) +- [neovim-remote](https://github.com/mhinz/neovim-remote) +- [nodejs](https://nodejs.org/en/) +- [ripgrep](https://github.com/BurntSushi/ripgrep) +- [fzf](https://github.com/junegunn/fzf) +- [rsync](https://github.com/WayneD/rsync) ## Current version - 1.3.0 diff --git a/help/lvim_bindings_normal_mode.md b/help/lvim_bindings_normal_mode.md index 70c8181d..5163301b 100644 --- a/help/lvim_bindings_normal_mode.md +++ b/help/lvim_bindings_normal_mode.md @@ -101,7 +101,7 @@ Normal mode | -------------- | ---------------------------- | --------------------------- | | | :TroubleToggle | Trouble toggle | | -------------- | ---------------------------- | --------------------------- | -| | :CommentToggle | Comment toggle | +| | :TelescopeBrowser | Telescope browser | | -------------- | ---------------------------- | --------------------------- | | | :LspVirtualTextToggle | Lsp virtual text toggle | | -------------- | ---------------------------- | --------------------------- | diff --git a/help/lvim_bindings_visual_mode.md b/help/lvim_bindings_visual_mode.md index cca36bd2..c7698516 100644 --- a/help/lvim_bindings_visual_mode.md +++ b/help/lvim_bindings_visual_mode.md @@ -18,5 +18,3 @@ Visual mode | J | :move \'>+1gv-gv | Move down | | ----- | -------------------- | --------------- | | | :AnyJumpVisual | Any jump visual | -| ----- | -------------------- | --------------- | -| | :CommentToggle | Comment toggle | diff --git a/lua/configs/global/init.lua b/lua/configs/global/init.lua index 4d4b9981..45e803f4 100644 --- a/lua/configs/global/init.lua +++ b/lua/configs/global/init.lua @@ -81,6 +81,8 @@ end configs["commands_global"] = function() vim.cmd('command! SetGlobalPath lua require("core.funcs").set_global_path()') vim.cmd('command! SetWindowPath lua require("core.funcs").set_window_path()') + vim.cmd('command! TelescopeBrowser lua require("core.funcs").load_telescope_browser()') + vim.cmd('command! TelescopeBookmarks lua require("core.funcs").load_telescope_bookmarks()') end configs["keymaps_global"] = function() diff --git a/lua/configs/global/keymaps.lua b/lua/configs/global/keymaps.lua index 17d59c90..98b563bf 100644 --- a/lua/configs/global/keymaps.lua +++ b/lua/configs/global/keymaps.lua @@ -50,7 +50,7 @@ keymaps["normal"] = { {"", ":LspGoToNext"}, -- Lsp go to next {"", ":LspGoToPrev"}, -- Lsp go to prev {"", ":TroubleToggle"}, -- Trouble toggle - {"", ":CommentToggle"}, -- Comment toggle + {"", ":TelescopeBrowser"}, -- Telescope browser {"", ":LspVirtualTextToggle"}, -- Lsp virtual text toggle {"", "DapToggleBreakpoint"}, -- Toggle breakpoint {"", "DapStartContinue"}, -- Start / continue diff --git a/lua/core/funcs.lua b/lua/core/funcs.lua index 0e203b30..5e70627f 100644 --- a/lua/core/funcs.lua +++ b/lua/core/funcs.lua @@ -93,4 +93,12 @@ M.set_window_path = function() vim.api.nvim_command("silent :lcd " .. path) end +M.load_telescope_browser = function() + require("telescope").extensions.file_browser.file_browser() +end + +M.load_telescope_bookmarks = function() + require("telescope").extensions.bookmarks.bookmarks() +end + return M diff --git a/lua/modules/global/configs/editor/init.lua b/lua/modules/global/configs/editor/init.lua index 526706cb..17759856 100644 --- a/lua/modules/global/configs/editor/init.lua +++ b/lua/modules/global/configs/editor/init.lua @@ -1,14 +1,10 @@ local config = {} function config.telescope() - if not packer_plugins["telescope.nvim"].loaded then - vim.cmd [[packadd telescope.nvim]] - vim.cmd [[packadd telescope-fzf-native.nvim]] - vim.cmd [[packadd telescope-media-files.nvim]] - end local telescope = require("telescope") telescope.load_extension "fzf" telescope.load_extension "media_files" + telescope.load_extension "file_browser" telescope.load_extension "flutter" telescope.setup { defaults = { @@ -80,7 +76,14 @@ function config.telescope() media_files = { filetypes = {"png", "webp", "jpg", "jpeg"}, find_cmd = "rg" - } + }, + file_browser = { + theme = "ivy" + }, + bookmarks = { + selected_browser = "brave", + url_open_plugin = "open_browser" + }, } } end @@ -179,7 +182,8 @@ function config.nvim_spectre() end function config.nvim_comment() - require("nvim_comment").setup() + -- require("nvim_comment").setup() + require('Comment').setup() end function config.vim_bookmarks() diff --git a/lua/modules/global/configs/ui/init.lua b/lua/modules/global/configs/ui/init.lua index d7d2f760..f0cb98c2 100644 --- a/lua/modules/global/configs/ui/init.lua +++ b/lua/modules/global/configs/ui/init.lua @@ -22,7 +22,7 @@ function config.dashboard_nvim() }, b = { description = {"  File explorer "}, - command = "Telescope file_browser" + command = "TelescopeBrowser" }, c = { description = {"  Search file "}, @@ -33,14 +33,18 @@ function config.dashboard_nvim() command = "Telescope live_grep" }, e = { + description = {"  Browser bookmarks "}, + command = ":TelescopeBookmarks" + }, + f = { description = {"  Help "}, command = ":LvimHelper" }, - f = { + g = { description = {"  Settings "}, command = ":e ~/.config/nvim/lua/configs/global/lvim.lua" }, - g = { + h = { description = {"  Readme "}, command = ":e ~/.config/nvim/README.md" } diff --git a/lua/modules/global/init.lua b/lua/modules/global/init.lua index e9942e57..642bdd91 100644 --- a/lua/modules/global/init.lua +++ b/lua/modules/global/init.lua @@ -96,6 +96,8 @@ modules["vim-ctrlspace/vim-ctrlspace"] = { cmd = "CtrlSpace" } +modules["tyru/open-browser.vim"] = {} + modules["nvim-telescope/telescope.nvim"] = { requires = { { @@ -104,9 +106,14 @@ modules["nvim-telescope/telescope.nvim"] = { }, { "nvim-telescope/telescope-media-files.nvim" + }, + { + "nvim-telescope/telescope-file-browser.nvim" + }, + { + "dhruvmanila/telescope-bookmarks.nvim" } }, - cmd = "Telescope", config = editor_config.telescope } @@ -126,8 +133,7 @@ modules["windwp/nvim-spectre"] = { config = editor_config.nvim_spectre } -modules["terrortylor/nvim-comment"] = { - cmd = "CommentToggle", +modules["numToStr/Comment.nvim"] = { config = editor_config.nvim_comment }