Coder Social home page Coder Social logo

newlines in Outline causing error about nvim-ide HOT 7 CLOSED

hbak avatar hbak commented on August 16, 2024
newlines in Outline causing error

from nvim-ide.

Comments (7)

ldelossa avatar ldelossa commented on August 16, 2024 1

@hbak should be fixed now.

from nvim-ide.

ldelossa avatar ldelossa commented on August 16, 2024

Oh interesting! This is the first time ive seen newlines in the LSP response for symbols.

By any chance so you know how vscode handles this?

It will def break nvim-ide, we probably want to filter them out and replace with a space or something similar

from nvim-ide.

hbak avatar hbak commented on August 16, 2024

Yeah, it felt like a weird case. Sorry, I have no idea how vscode handles it.
Me, being impulsive, just did this:

for i, line in ipairs(self.buffer_lines) do
	self.buffer_lines[i] = [line](line:gsub('\n%s*', ''))
end

image

(notice "vim.lsp.diagnostic")

from nvim-ide.

ldelossa avatar ldelossa commented on August 16, 2024

What language sever is this? And can you link me to that block of code if its public?

Kinda curious if thats a lsp bug, its basically spitting out the new lines in the code, huh?

from nvim-ide.

hbak avatar hbak commented on August 16, 2024

lol! I've just discovered it's code that I've taken from a Reddit comment posted by... you!
https://www.reddit.com/r/neovim/comments/og1cdv/comment/h4gzvvv/

LSP is sumneko_lua.

from nvim-ide.

ldelossa avatar ldelossa commented on August 16, 2024

lol. But how does that bit of code have to do with the outline component?

P.s. i use this now: https://github.com/ldelossa/dotfiles/blob/5f149b92de9ed1c5a6a8759069dbc20f43aa17ff/config/nvim/plugs.vim#L60 lol

from nvim-ide.

hbak avatar hbak commented on August 16, 2024

And can you link me to that block of code if its public?

But how does that bit of code have to do with the outline component?

Oh sorry, your Reddit comment I posted is the block of code that caused the multi-line LSP node with Sumneko. Was that not what you meant?

local diags = vim
  .lsp
  .diagnostic
  .get_line_diagnostics(...)

from nvim-ide.

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.