1
0
mirror of https://github.com/dcarrillo/dotfiles.git synced 2024-12-22 06:58:01 +00:00

[neovim] Replace the projections plugin with neovim-projects

This commit is contained in:
Daniel Carrillo 2023-09-28 18:17:05 +02:00
parent f7c1110ca3
commit 8fcb4267cc
Signed by: dcarrillo
GPG Key ID: E4CD5C09DAED6E16
9 changed files with 41 additions and 40 deletions

View File

@ -14,15 +14,15 @@
"friendly-snippets": { "branch": "main", "commit": "ebf6d6e83494cdd88a54a429340256f4dbb6a052" },
"fzy-lua-native": { "branch": "master", "commit": "820f745b7c442176bcc243e8f38ef4b985febfaf" },
"git-blame.nvim": { "branch": "master", "commit": "a36b277e527f9d34efe16c3636555ce0e0c0464c" },
"github-nvim-theme": { "branch": "main", "commit": "bf4cd7e05ff1ac9a301edcd5051b9cd7f5c81f0d" },
"github-nvim-theme": { "branch": "main", "commit": "48f95f763e1a98e508260a20e448c3ff2d91213a" },
"gitsigns.nvim": { "branch": "main", "commit": "bb808fc7376ed7bac0fbe8f47b83d4bf01738167" },
"go.nvim": { "branch": "master", "commit": "0b04e4bdb4ac22ad568f1f6621cffc2a8908eb85" },
"go.nvim": { "branch": "master", "commit": "019936780060efc64c0f22a47afd08fbbe82e026" },
"guihua.lua": { "branch": "master", "commit": "5ad8dba19ce9b9fd8965598984dfdc9c119f97e4" },
"indent-blankline.nvim": { "branch": "master", "commit": "9637670896b68805430e2f72cf5d16be5b97a22a" },
"karen-yank.nvim": { "branch": "main", "commit": "817f50c9464ce557c8f7f8f4d4c8d2f7b81fc40c" },
"lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" },
"lazy.nvim": { "branch": "main", "commit": "6b55e4695a5e85d862e517bf860bd913a4a45d86" },
"leap.nvim": { "branch": "main", "commit": "5efe985cf68fac3b6a6dfe7a75fbfaca8db2af9c" },
"lspsaga.nvim": { "branch": "main", "commit": "14f0c87db4c52d0b9e92d8c1a1fece10a00f6f91" },
"lspsaga.nvim": { "branch": "main", "commit": "b7873e556a5451c5febc0d46ba80767b2beea49e" },
"lualine-lsp-progress": { "branch": "master", "commit": "56842d097245a08d77912edf5f2a69ba29f275d7" },
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" },
"markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" },
@ -31,32 +31,33 @@
"mini.align": { "branch": "main", "commit": "86c8edae77023a7b71d0fa9e2bf78960c1e46fd8" },
"mini.starter": { "branch": "main", "commit": "c7e027558477838eac7109d8576ff1f2d9804845" },
"neo-tree.nvim": { "branch": "v2.x", "commit": "b529fb2ae9206ca1d84ee72b596deecbc088ac59" },
"neovim-project": { "branch": "main", "commit": "48e2cca6b1492760bb0b90d4fcbd8a4a6c5003cb" },
"neovim-session-manager": { "branch": "master", "commit": "df544e17798dd0e6e33ecf0991dfde9174367837" },
"noice.nvim": { "branch": "main", "commit": "396f9146529130904e07c45e90ecdbfa607534f3" },
"nui.nvim": { "branch": "main", "commit": "c8de23342caf8d50b15d6b28368d36a56a69d76f" },
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
"nvim-autopairs": { "branch": "master", "commit": "7b3eb9b5813a22188c4dbb248475fcbaf9f4d195" },
"nvim-autopairs": { "branch": "master", "commit": "de4f7138a68d5d5063170f2182fd27faf06b0b54" },
"nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" },
"nvim-dap": { "branch": "master", "commit": "debd7c2f80eaf20c5f5df25db8d8c1b9b18f4421" },
"nvim-dap-ui": { "branch": "master", "commit": "1e21b3b50e67700e32285b5a74e645311fd8bbea" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" },
"nvim-lspconfig": { "branch": "master", "commit": "4266f9bb36b4fb09edd19b67d95043cf7ff88ddf" },
"nvim-treesitter": { "branch": "master", "commit": "fc93fa5c07df7cd578a3ea82d7c075c0460a6884" },
"nvim-lspconfig": { "branch": "master", "commit": "68b23c06132cb1ef8d5690111c112388fbcf1c30" },
"nvim-treesitter": { "branch": "master", "commit": "cb139d880bcf9b3a6f29f2bd088a7491d1662918" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "95e9ba9de4289d221666b66fd930d157c7ca08c6" },
"nvim-ufo": { "branch": "main", "commit": "6f2ccdf2da390d62f8f9e15fc5ddbcbd312e1e66" },
"nvim-web-devicons": { "branch": "master", "commit": "973ab742f143a796a779af4d786ec409116a0d87" },
"nvim-web-devicons": { "branch": "master", "commit": "45d0237c427baba8cd05e0ab26d30e2ee58c2c82" },
"plenary.nvim": { "branch": "master", "commit": "9ce85b0f7dcfe5358c0be937ad23e456907d410b" },
"projections.nvim": { "branch": "pre_release", "commit": "889914169fa1f5c00fb8659653b5a8330fb223e6" },
"promise-async": { "branch": "main", "commit": "e94f35161b8c5d4a4ca3b6ff93dd073eb9214c0e" },
"statuscol.nvim": { "branch": "main", "commit": "0944234914438695050eec6f83b4669864680c1a" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" },
"telescope.nvim": { "branch": "master", "commit": "40c8d2fc2b729dd442eda093cf8c9496d6e23732" },
"tokyonight.nvim": { "branch": "main", "commit": "9a01eada39558dc3243278e6805d90e8dff45dc0" },
"telescope.nvim": { "branch": "master", "commit": "84d53dfdbefbdf84e861a288abc71ef8ccafd04e" },
"tokyonight.nvim": { "branch": "main", "commit": "e89caa3ad6d8da9d0dd981ec74a82c55adc61ffd" },
"trouble.nvim": { "branch": "main", "commit": "3f85d8ed30e97ceeddbbcf80224245d347053711" },
"vim-bbye": { "branch": "master", "commit": "25ef93ac5a87526111f43e5110675032dbcacf56" },
"vim-illuminate": { "branch": "master", "commit": "6acf7d4a18255a3ddc43770866c8e148fe85af7b" },
"vim-illuminate": { "branch": "master", "commit": "1b5d70332a51a1de05f281069851865a2bb1e6d7" },
"vim-kitty-navigator": { "branch": "master", "commit": "c3d8aaaa61717b2c142ff39553fcab709fd606a7" },
"vim-markdown-toc": { "branch": "master", "commit": "7ec05df27b4922830ace2246de36ac7e53bea1db" },
"vim-visual-multi": { "branch": "master", "commit": "1c9207b28c8898ab01b54e6d6b61b0b820a814bc" },
"wilder.nvim": { "branch": "master", "commit": "679f348dc90d80ff9ba0e7c470c40a4d038dcecf" },
"yaml-companion.nvim": { "branch": "main", "commit": "4de1e1546abc461f62dee02fcac6a02debd6eb9e" }
}

View File

@ -34,14 +34,6 @@ vim.api.nvim_create_autocmd({ "BufWinEnter" }, {
end,
})
-- -- Autostore session on VimExit
-- local Session = require("projections.session")
-- vim.api.nvim_create_autocmd({ "VimLeavePre" }, {
-- callback = function()
-- Session.store(vim.loop.cwd())
-- end,
-- })
-- Ensure terraform files use hcl LSP
vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
pattern = { "*.tf" },

View File

@ -13,8 +13,3 @@ end, {})
vim.api.nvim_create_user_command("RemoveTrailingSpaces", function()
vim.cmd("% s/\\s\\+$//e")
end, {})
local workspace = require("projections.workspace")
vim.api.nvim_create_user_command("AddWorkspace", function()
workspace.add(vim.loop.cwd())
end, {})

View File

@ -93,8 +93,8 @@ keymap("x", "<leader>/", "<esc><cmd>lua require'Comment.api'.toggle.linewise(vim
keymap("n", "<leader>df", ":DiffviewFileHistory %<cr>", opts)
keymap("n", "<leader>dc", ":DiffviewClose<cr>", opts)
-- Projections
keymap("n", "<leader>fp", ":Telescope projections<cr>", opts)
-- Projects
keymap("n", "<leader>fp", ":Telescope neovim-project discover<cr>", opts)
-- Base64
keymap("v", "<leader>64e", ":<c-u>lua require'b64'.encode()<cr>", opts)

View File

@ -19,6 +19,16 @@ local lazy_opts = {
},
}
local projects = function ()
local file = io.open(os.getenv("HOME") .. "/.config/nvim/neovim-projects.json", "rb")
if not file then return {} end
local jsonString = file:read "*a"
file:close()
return vim.json.decode(jsonString)
end
require("lazy").setup({
-- Colorschemes
{
@ -87,7 +97,20 @@ require("lazy").setup({
},
{ "romgrk/fzy-lua-native" },
{ "mg979/vim-visual-multi", version = "v0.*" },
{ "gnikdroy/projections.nvim", branch = "pre_release" },
{
"coffebar/neovim-project",
opts = {
projects = projects(),
last_session_on_startup = false,
},
init = function()
vim.opt.sessionoptions:append("globals")
end,
dependencies = {
{ "Shatur/neovim-session-manager" },
},
priority = 100,
},
{ "nvim-treesitter/nvim-treesitter", event = "BufReadPost" },
{
"nvim-neo-tree/neo-tree.nvim",

View File

@ -16,7 +16,6 @@ require("plugins.noice")
require("plugins.trouble")
require("plugins.autosave")
require("plugins.markdowntoc")
require("plugins.projections")
require("plugins.diffview")
require("plugins.align")
require("plugins.ufo")

View File

@ -1,8 +0,0 @@
require("projections").setup({
store_hooks = {
pre = function()
-- Close neo-tree before storing sessions
vim.cmd([[Neotree action=close]])
end,
},
})

View File

@ -22,7 +22,7 @@ starter.setup({
header = logo,
footer = "",
items = {
new_section("Projects", "Telescope projections", "Telescope"),
new_section("Projects", "Telescope neovim-project discover", "Telescope"),
new_section("Recent files", "Telescope oldfiles", "Telescope"),
new_section("New file", "ene | startinsert", "Built-in"),
new_section("Quit", "qa", "Built-in"),

View File

@ -39,5 +39,4 @@ telescope.setup({
telescope.load_extension("fzf")
telescope.load_extension("ui-select")
telescope.load_extension("projections")
telescope.load_extension("yaml_schema")