natecraddock / workspaces.nvim

a simple plugin to manage workspace directories in neovim
MIT License
309 stars 15 forks source link

[Bug] - `auto_open` setup property opening telescope with `modifiable` off #27

Closed nitaicharan closed 8 months ago

nitaicharan commented 11 months ago

Description

When the property auto_open is set with value true, and we open in a previous added project the telescope open with modifiable off.

P.S. If it's not a workspaces bug, can someone give me a hand to fix it?

https://github.com/natecraddock/workspaces.nvim/assets/14323599/de6a2d24-afab-4407-a5f3-a534721f1030

Config

local vim = vim
local M = {}

local ok, package = pcall(require, "workspaces")
if not ok then
  return vim.notify("Failed to require package `workspaces`")
end

package.setup({
  auto_open = true, -- FIX: Cannot make changes, 'modifiable' is off
  notify_info = false,
  hooks = {
    open = "Telescope find_files",
    -- open = "NvimTreeOpen",
  }
})

local telescope_ok, telescope = pcall(require, "telescope")
if not telescope_ok then
  return vim.notify("Failed to require package `telescope`")
end

telescope.load_extension("workspaces")

M.open = function()
  telescope.extensions.workspaces.workspaces()
end

return M
natecraddock commented 10 months ago

Hi @nitaicharan I'm sorry for the long delay on replying here.

I just tested this and I cannot reproduce the issue. I expect this may be some interference with another plugin or something else in your config

natecraddock commented 8 months ago

Hey! I still can't reproduce. I'm closing this. If you want me to look into it again, please let me know!