zbirenbaum / nvterm

NvChad's Official Terminal Plugin ( Unmaintained but still usable and stable), wait for v3.0
GNU General Public License v3.0
178 stars 21 forks source link

I installed it exactly as the readme says but it is not working #31

Closed Vinni-Cedraz closed 1 year ago

Vinni-Cedraz commented 1 year ago

Here are my keymaps:

vim.cmd("nmap tt lua require('nvterm').toggle()") vim.cmd("nmap tf lua require('nvterm').toggle('float')") vim.cmd("nmap th lua require('nvterm').toggle('horizontal')") vim.cmd("nmap tv lua require('nvterm').toggle('vertical')") vim.cmd("nmap tb lua require('nvterm').toggle('buffer')") vim.cmd("nmap tt lua require('nvterm').toggle('terminal')") vim.cmd("nmap tw lua require('nvterm').toggle('window')") vim.cmd("nmap tt lua require('nvterm').toggle('tab')") vim.cmd("nmap twb lua require('nvterm').toggle('winblend')") vim.cmd("nmap twc lua require('nvterm').toggle('winblend_cursorline')")

and this is the error that happens when I call the first:

E5108: Error executing lua [string ":lua"]:1: attempt to call field 'toggle' (a nil value) stack traceback: [string ":lua"]:1: in main chunk E5108: Error executing lua [string ":lua"]:1: attempt to call field 'toggle' (a nil value) stack traceback: [string ":lua"]:1: in main chunk

siduck commented 1 year ago

image

Vinni-Cedraz commented 1 year ago

Do you really think you have helped?

siduck commented 1 year ago

Do you really think you have helped?

I do, your error clearly states that nvterm module has been called. Where as the readme says its should be nvterm.terminal. No need to be rude. Please read the readme before using the plugin

Vinni-Cedraz commented 1 year ago

If someone reads something many times and still doesn't see what was wrong, then copying and pasting helps nothing. Sometimes we are just tired and need some explaining. Anyway, I didn't mean any harm, stay strong and have a nice day.

siduck commented 1 year ago

does this command work?

lua require("nvterm.terminal").new "horizontal"

Vinni-Cedraz commented 1 year ago

when I tried it by typing :require("nvterm.terminal").new "horizontal" it did not work, should I try again with : lua require("nvterm.terminal").new "horizontal" ?

siduck commented 1 year ago

when I tried it by typing :require("nvterm.terminal").new "horizontal" it did not work, should I try again with : lua require("nvterm.terminal").new "horizontal" ?

yes lua is needed