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

Errors for multi-line nodes #61

Open
LittleTealeaf opened this issue May 28, 2023 · 3 comments
Open

Errors for multi-line nodes #61

LittleTealeaf opened this issue May 28, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@LittleTealeaf
Copy link

I'm getting the following errors:

   Error  10:58:25 AM msg_show.lua_error Error executing vim.schedule lua callback: ...re/nvim/lazy/nvim-navbuddy/lua/nvim-navbuddy/display.lua:39: 'replacement string' item contains newlines
stack traceback:
	[C]: in function 'nvim_buf_set_lines'
	...re/nvim/lazy/nvim-navbuddy/lua/nvim-navbuddy/display.lua:39: in function 'fill_buffer'
	...re/nvim/lazy/nvim-navbuddy/lua/nvim-navbuddy/display.lua:366: in function 'redraw'
	...re/nvim/lazy/nvim-navbuddy/lua/nvim-navbuddy/display.lua:248: in function 'new'
	...share/nvim/lazy/nvim-navbuddy/lua/nvim-navbuddy/init.lua:255: in function 'handler'
	...share/nvim/lazy/nvim-navbuddy/lua/nvim-navbuddy/init.lua:201: in function 'handler'
	....local/share/nvim/lazy/nvim-navic/lua/nvim-navic/lib.lua:264: in function 'handler'
	...w/Cellar/neovim/0.9.0/share/nvim/runtime/lua/vim/lsp.lua:1394: in function ''
	vim/_editor.lua: in function <vim/_editor.lua:0>
   Error  10:58:25 AM msg_show.lua_error Error detected while processing CursorMoved Autocommands for "<buffer=16>":
10:58:25 AM msg_show Error executing lua callback: ...re/nvim/lazy/nvim-navbuddy/lua/nvim-navbuddy/display.lua:39: 'replacement string' item contains newlines
stack traceback:
	[C]: in function 'nvim_buf_set_lines'
	...re/nvim/lazy/nvim-navbuddy/lua/nvim-navbuddy/display.lua:39: in function 'fill_buffer'
	...re/nvim/lazy/nvim-navbuddy/lua/nvim-navbuddy/display.lua:366: in function 'redraw'
	...re/nvim/lazy/nvim-navbuddy/lua/nvim-navbuddy/display.lua:198: in function <...re/nvim/lazy/nvim-navbuddy/lua/nvim-navbuddy/display.lua:194>

When I try opening navbuddy in my .scss file.

This is what my :LspInfo is:

 Press q or <Esc> to close this window. Press <Tab> to view server doc.
 
 Language client log: /home/tealeaf/.local/state/nvim/lsp.log
 Detected filetype:   scss
 
 3 client(s) attached to this buffer: 
 
 Client: null-ls (id: 1, bufnr: [4])
 	filetypes:       graphql, handlebars, less, jsonc, typescriptreact, typescript, vue, markdown.mdx, javascript, javascriptreact, css, scss, markdown, yaml, json, html, toml
 	autostart:       false
 	root directory:  /home/tealeaf/git/littletealeaf.github.io
 	cmd:             <function>
 
 Client: cssls (id: 2, bufnr: [4])
 	filetypes:       css, scss, less
 	autostart:       true
 	root directory:  /home/tealeaf/git/littletealeaf.github.io
 	cmd:             /home/tealeaf/.local/share/nvim/mason/bin/vscode-css-language-server --stdio
 
 Client: emmet_ls (id: 3, bufnr: [4])
 	filetypes:       astro, css, eruby, html, htmldjango, javascriptreact, less, pug, sass, scss, svelte, typescriptreact, vue
 	autostart:       true
 	root directory:  /home/tealeaf/git/littletealeaf.github.io
 	cmd:             /home/tealeaf/.local/share/nvim/mason/bin/emmet-ls --stdio
 
 Configured servers list: kotlin_language_server, cssls, yamlls, emmet_ls, prismals, jsonls, tsserver, vimls, clangd, sqlls, pyright, texlab, gradle_ls, lua_ls, lemminx, html, bashls, gopls, jdtls, cssmodules_ls

Not a total deal-breaker for me, but thought this would be something that should be looked into :)

@LittleTealeaf
Copy link
Author

Crazily enough, it started working when I moved some code to another file. Seems it doesn't like this section of code:

@media only screen and (max-device-width: 768px),
  only screen and (max-width: 768px) {
		@include header-mobile;
}

because it has multiple lines?

@LittleTealeaf LittleTealeaf changed the title Errors thrown for SCSS Errors for multi-line nodes May 28, 2023
@SmiteshP
Copy link
Owner

Oh I see, this is definitely due to multi line elements. How should we fix this though 🤔

@SmiteshP SmiteshP added the bug Something isn't working label Jun 10, 2023
@Charging1948
Copy link

Happens also inside of nix-files, when writing multi-line strings:

text = ''
  # Check if the correct number of arguments is provided
  if [ "''$#" -ne 2 ]; then
    echo "Usage: ''$0 input.pdf output.md"
    exit 1
  fi
'';

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

3 participants