Code Monkey home page Code Monkey logo

Comments (8)

Jesspu avatar Jesspu commented on May 28, 2024 1

I am getting this same error with this setup

`require('FTerm').setup({})

vim.api.nvim_create_user_command('FTermOpen', require('FTerm').open, { bang = true })
vim.api.nvim_create_user_command('FTermClose', require('FTerm').close, { bang = true })`

When I run :FTermOpen, I get the same error as above, and a blank floating window.

I have the latest version with the commit above.

Update: I actually just resolved this.

Had to change the setup step to
require('FTerm').setup({cmd = 'cmd.exe'})

from fterm.nvim.

numToStr avatar numToStr commented on May 28, 2024

What's your fterm config?

from fterm.nvim.

kishikaisei avatar kishikaisei commented on May 28, 2024

This is it right now for testing et al.

require'FTerm'.setup({
	-- Command to run inside the terminal. It could be a `string` or `table`
	-- cmd = os.getenv('pwsh'),

	-- Neovim's native window border. See `:h nvim_open_win` for more configuration options.
	border = 'rounded',

	-- Close the terminal as soon as shell/command exits.
	-- Disabling this will mimic the native terminal behaviour.
	auto_close = true,

	-- Highlight group for the terminal. See `:h winhl`
	hl = 'Normal',

	-- Transparency of the floating window. See `:h winblend`
	blend = 0,

	-- Object containing the terminal window dimensions.
	-- The value for each field should be between `0` and `1`
	dimensions = {
		height = 0.9, -- Height of the terminal window
		width = 0.9, -- Width of the terminal window
		x = 0.5, -- X axis of the terminal window
		y = 0.5, -- Y axis of the terminal window
	}
})

-- -- Example keybindings
local map = vim.api.nvim_set_keymap
local opts = { noremap = true, silent = true }
map('n', '<A-g>', "<CMD>lua require('FTerm').run('lazygit')<CR>", opts)

vim.cmd('command! FTermOpen lua require("FTerm").open()')
vim.cmd('command! FTermClose lua require("FTerm").close()')
vim.cmd('command! FTermExit lua require("FTerm").exit()')
vim.cmd('command! FTermToggle lua require("FTerm").toggle()')

from fterm.nvim.

numToStr avatar numToStr commented on May 28, 2024

Config looks fine to me. IDK what's the issue then as this doesn't happen on Linux. And I don't have access to any windows machine so I won't be able to fix this issue. If you can fix it that will be great and I'll be happy to assist you :)

from fterm.nvim.

atulpatildbz avatar atulpatildbz commented on May 28, 2024

I'm facing this issue on windows too.

from fterm.nvim.

numToStr avatar numToStr commented on May 28, 2024

@atulpatildbz If you are able to fix the issue that would be much appreciated.

from fterm.nvim.

numToStr avatar numToStr commented on May 28, 2024

@kishikaisei @atulpatildbz Does c2a4c4b solve the issue?

from fterm.nvim.

numToStr avatar numToStr commented on May 28, 2024

Had to change the setup step to require('FTerm').setup({cmd = 'cmd.exe'})

I guess that must be the issue. The default value of cmd is os.getenv('SHELL') and I am not sure whether this is available or not on windows.

I am closing this for now. If anyone else having this issue please try to update cmd option in setup().

from fterm.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.