2,458 questions
1
vote
0
answers
74
views
Persistant Folds in Neovim with Treesitter
I am unable to get my folds to save and load between neovim sessions. Currently my sessions are being saved, and I ahve unable to load them through a autocmd, but if I run :loadview after loading into ...
1
vote
0
answers
551
views
Why might none of my language servers be running when I have a buffer open for their respective languages?
In advance, I apologize if the code looks messy; I tried pasting my code into the "add code here" thing and it kinda only took the first line and ignored formatting on the rest.
I use Neovim....
2
votes
1
answer
344
views
How to properly set root directory for phpactor in neovim
I am trying to figure out how to make phpactor work with neovim for one of my legacy projects.
I am using the latest neovim + kickstart, my setup is quite basic:
phpactor = {
cmd = { "phpactor&...
3
votes
1
answer
4k
views
Undefined global `vim`
I have searched for a solution but nothing I have found worked.
I have lazy.nvim as plugin manager.
I installed the following plugins
return {
"mason-org/mason-lspconfig.nvim",
...
1
vote
1
answer
710
views
Error with npm while installing Pyright LSP via Mason.nvim on Linux
I was trying to use a Python Lsp in my project to code faster with Neovim. However, I can't install the Pyright Lsp with Mason because there's an error with npm.
◍ pyright
▶ # [46/46] npm ...
1
vote
1
answer
101
views
Terminal output redirect to buffer in Neovim
Is it possible in neovim to execute a command in the neovim's internal terminal and redirect output to a real buffer that'd support toggling word wrap?
Currently terminal buffer doesn't allow you to ...
1
vote
0
answers
40
views
Is there a way to have a local lazy.nvim plugin defined in one file?
Since lazy.nvim reloads the plugins when the spec is modified, I'm trying to have my user configurations in the shape of local plugins.
I have 4 files with the same structure:
local function func ()
--...
1
vote
1
answer
105
views
How to programmatically create Autocmds with Lua in Neovim
I'm transitioning to configuring Neovim with Lua. I have years of programming experience with but don't know Lua nor vimscript.
Concretely I want to organize a bunch of hotkey bindings where each key ...
1
vote
1
answer
50
views
Using nvim (lua) to fill template content or batch replace
Suppose I have a template:
[user]
name = ${NAME}
email = ${EMAIL}
here ${NAME} and ${EMAIL} are variable placeholders.
Suppose I decide:
NAME=Carson
[email protected]
I want these variables ...
1
vote
2
answers
436
views
NeoVim Highlight .ts template as HTML / JSX
Update:
The closest I am able to get is by using an hmtl tagged template string. (This highlighting works even if html is undefined in the file.)
But this doesn't work for trying to do something like:
...
3
votes
1
answer
466
views
The ‘gitsigns’ plugin outputs an error E5560 in neovim
I am new to neovim. After I learned to install neovim and lazyvim, gitsigns plugin reported an error every time I opened a file in a project.
The error is as follows
> Error executing luv callback:
...
2
votes
3
answers
261
views
How to use a pattern in Lua 5.1 or Neovim to match multiple file extensions?
I'm trying to use a regular expression in Lua to check if a file path ends with specific extensions
(e.g., .mp4, .mkv, .avi, .mov, .flv, .wmv).
I want to avoid using a for loop to check each extension ...
1
vote
1
answer
99
views
How to define syntax highlighting for both multi-line and single line strings inside of vim syntax file
I have a programming language that supports multi-line strings, the syntax is as follows (EBNF):
longstring ::= '"""' {'"'} newline chars newline '"""' {'"'}
...
1
vote
0
answers
57
views
Rust-analyzer documentation window resize (coc.nvim)
I'm using coc.nvim with rust-analyzer, and it works fine. My problem is having the documentation window take up half the screen (as can be seen here)
I've tried to change its size from withing my init....
5
votes
1
answer
2k
views
Neovim throws Lua error: "Failed to run `config` for lsp-zero.nvim"
I have setup neovim some month ago to see how coding in it is like. Today I updated the LSPs in Mason and after that I got the error below.
The error message occurs at every start now and I don't know ...
1
vote
1
answer
463
views
Neovim neotree starting on the right
I am trying to use neotree with the following config:
local map = vim.keymap.set
return function()
local toggle_cmd = vim.api.nvim_replace_termcodes(
"<cmd>Neotree toggle ...
1
vote
1
answer
97
views
NeoVim nvim-cmp - crashes when typing "$" in CSS/SCSS files
After installing "nvim-autopairs" which generates matching closing tags for functions/css etc, I am getting this error.
Now I have Lazy Package Manager installed, which installed nvim-...
1
vote
1
answer
456
views
Neovim - see unsaved changes to buffer compared to saved file
The goal
When I open a file in Neovim and make changes to it, I'd like to be able to view the difference between the buffer contents and the original file on disk.
Similar to what Sublime Text has:
...
1
vote
2
answers
149
views
How to go to the previous line in insert mode without loosing leading whitespaces (nvim)
Let's say we have the following code:
function test() {
const a = {<HERE>}; // `<HERE>` is the caret position
}
When enter is pressed, the leading whitespaces are added as expected:
...
1
vote
1
answer
37
views
Failing to get pontusk/cmp-sass-variables to work in NVIM Kickstart with Lazy package-manager
Problem: no completions of SCSS variables like $color-red in all files. I tried autocompletes in variables.scss file itsself. In other SCSS files like general.scss which includes the variables.scss ...
2
votes
0
answers
87
views
nvim c++ build input
I am using nvim and I want to build c++ with this. I used this code to test and though it has input, nvim just ignores it and prints as "250". How can I get input by running cpp code through ...
0
votes
0
answers
67
views
How to automatically set Marks `m<` and `m>` in Nvim after Visual Mode using `sign_define`
I want to add sign_define for mark
So, I wrote the following code, which can be manually added and works well.
local strRegs = '0123456789' ..
'abcdefghijklmnopqrstuvwxyz' ..
'...
1
vote
1
answer
138
views
Hide numbers that show the number of tabs (fold-level) in Neovim
In Neovim, I've noticed numbers that indicate the number of tabs in a line (see the example image below). I find them distracting and would like to hide them. However, I'm confused because they don't ...
0
votes
0
answers
126
views
LazyVim, debugger for CPP on Mac OS
For last few days I have been learning to work with neovim/lazyvim and configuring to work with C++
Idea is to try to see if I can use this as main editor, instead of vscode.
I managed to setup ...
1
vote
0
answers
243
views
Random Errors with Clang LSP/Neovim when using ESP-IDF
I'm currently trying to work on project using neovim + clangd LSP and ESP-IDF. However, clangd isn't playing nice with ESP-IDF and it's various build systems despite having access to a build/...