Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entering non-existing file doesn't create it anymore #166

Closed
nawordar opened this issue Jul 29, 2022 · 3 comments
Closed

Entering non-existing file doesn't create it anymore #166

nawordar opened this issue Jul 29, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@nawordar
Copy link

Description

In #130 was implemented creating files when they don't exist. Since some time it doesn't work anymore. I think that the feature was accidentally removed during some refactor.

Neovim version

NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by builduser

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

Operating system and version

Arch Linux

Steps to reproduce

  1. Open file browser
  2. Type a file name that does not exist

Expected behavior

File gets created and opened

Actual behavior

Nothing happens

Minimal config

vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvim/site]]
local package_root = '/tmp/nvim/site/pack'
local install_path = package_root .. '/packer/start/packer.nvim'
local function load_plugins()
  require('packer').startup {
    {
      'wbthomason/packer.nvim',
      {
        'nvim-telescope/telescope.nvim',
        requires = {
          'nvim-lua/plenary.nvim',
          'nvim-telescope/telescope-file-browser.nvim',
        },
      },
      -- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
    },
    config = {
      package_root = package_root,
      compile_path = install_path .. '/plugin/packer_compiled.lua',
      display = { non_interactive = true },
    },
  }
end
_G.load_config = function()
  require('telescope').setup()
  require('telescope').load_extension('file_browser')
  -- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
end
if vim.fn.isdirectory(install_path) == 0 then
  print("Installing Telescope and dependencies.")
  vim.fn.system { 'git', 'clone', '--depth=1', 'https://github.com/wbthomason/packer.nvim', install_path }
end
load_plugins()
require('packer').sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua load_config()]]
@nawordar nawordar added the bug Something isn't working label Jul 29, 2022
@fdschmidt93
Copy link
Member

Have you fully read the PR description?

Furthermore, this commit reflects a breaking change. The input callback to create a file or folder via the prompt if no result is shown is now superseded by the fb_actions.create_from_prompt mapped by default to Shift-CR (works if your terminal recognizes this, otherwise please remap).

The reason is that there should be one straightforward approach to do something for simplicity and cohesiveness. That way if the file you create for some reason fuzzily matches something else still can be created.

That said, Shift-CR should work on all terminal emulators; otherwise you are probably already missing out on a lot of additional keys that can be mapped.

Anyways,the original issue is answered again, so closing.

@nawordar
Copy link
Author

nawordar commented Jul 29, 2022

I meant to mention #117. I didn't notice that I actually linked PR that changed Enter to S-Enter. Sorry for not fully reading the description.

The change wasn't mentioned in Breaking Changes, which I am subscribed to.

@fdschmidt93
Copy link
Member

The change wasn't mentioned in Breaking Changes, which I am subscribed to.

Apologies, that's my bad then!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants