[ / / / / / / / / / / / / / ] [ dir / baphomet / caco / choroy / christ / dbv / dempart / gfl / leandro ][Options][ watchlist ]

/tech/ - Technology

You can now write text to your AI-generated image at https://aiproto.com It is currently free to use for Proto members.
Email
Comment *
Verification *
File
Select/drop/paste files here
Password (Randomized for file and post deletion; you may also set your own.)
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Expand all images

File (hide): 07ae4f582760dcd⋯.jpg (43.7 KB, 500x375, 4:3, 1460070192717.jpg) (h) (u)

[–]

 No.1043921>>1043987 [Watch Thread][Show All Posts]

>The Language Server Protocol (LSP) is an open, JSON-RPC-based protocol for use between source code editors or integrated development environments (IDEs) and servers that provide programming language-specific features. The goal of the protocol is to allow programming language support to be implemented and distributed independently of any given editor or IDE.

It sounds really good on paper, convince me that it's shit and botnet.

https://en.wikipedia.org/wiki/Language_Server_Protocol

https://langserver.org/

https://microsoft.github.io/language-server-protocol/

 No.1043926>>1043947

The concept is solid. The implementation is absolute _bloat_.


 No.1043947

>>1043926

That doesn't tell me jack shit about it, given that /tech/ and /g/ treat any kind of feature they don't use as "muh bloat".


 No.1043958>>1044087

It's gay.


 No.1043987>>1044076

File (hide): c332c267be546a0⋯.png (199.4 KB, 1960x1043, 280:149, eglot.png) (h) (u)

File (hide): 061b6ff3e7c4c29⋯.png (261.42 KB, 1960x1043, 280:149, lsp-mode.png) (h) (u)

>>1043921 (OP)

I've been trying it via Emacs, using both lsp-mode and eglot. I prefer the latter, since it sticks to the Emacs interface which scales down better to physically smaller screens that I sometimes use, the former tries to replicate what I assume to be vscode's interface, somewhat poorly from what I can tell. Eglot is also simpler to interact with and evens out sending, so the lag is distributed more evenly, and it also seems to be a bit more stable. Mostly I've been trying it on Javascript and Java, but I've been using lsp-mode for Java which also requires another package called lsp-java. This isn't required for every LSP server in lsp-mode, just a few like Java, and eglot doesn't really have packages like that for it. However, eglot requires Emacs 26.1, since it uses the somewhat improved flymake that comes with it. Here are some screenshots of lsp-mode and eglot, although used on different languages. The language servers used are the Eclipse JDT Language Server and Sourcegraph's javascript-typescript-langserver for lsp-mode and eglot respectively.

It may be worth it for you where the custom made servers meant for your text editor fail, but usually its a somewhat laggy experience for me (bearable with eglot). Could depend a lot on what language the server is implemented in and how well it was implemented as well, though. Some languages have multiple language servers implemented for them already, but usually theres one that comes out on top compared to the rest. Check https://langserver.org/ for a non-exhaustive list of these servers (although it probably has all of Sourcegraph's servers on there since its run by them).


 No.1044072>>1044090

Why would they use JSON-RPC instead of something lighter-weight like MessagePack RPC? There is no advantage to the messages being human-readable, so you might as well make it binary. The big advantage of JSON is how easy it is to read and write for humans.


 No.1044076>>1044089

>>1043987

last time I tried lsp on emacs there was a 100% cpu usage thing because neither implementation had the ability to set a default settings file so it would just lag like crazy in the background.

Unsurprisingly vim doesn't have this problem because more than 15 people use vim.


 No.1044087>>1044089 >>1044148

File (hide): 36693a5764b24e4⋯.jpg (143.07 KB, 400x400, 1:1, mashed.jpg) (h) (u)

>>1043958

Basically.

It is Microsoft's darling in solving the problem of not being able to integrate proper debuggers and linters into text editors.

The protocol is save and sound, but all the implementations are beyond trash, relegated to shotty plugins.

All the C LSPs require an own version of clang running in the background. Now everything has multiple points of failure.

It is pic related.

Nothing beats a competent text editor like emacs with proper integration into GCC's linting options.


 No.1044089>>1044133 >>1044405

>>1044076

I don't think that happens anymore, since I'm not getting 100% load from running lsp-mode or eglot. Probably happened back when those packages were far less stable, I hear lsp-mode has been reworked quite a bit, to the point where the comparison the eglot dev made between lsp-mode and eglot a while ago is now inaccurate, according to him.

>Unsurprisingly vim doesn't have this problem because more than 15 people use vim.

Emacs is still widely used, I have seen it installed on hundreds of machines at an organization (doesn't translate to usercount, but dispels the myth of "not on MY machine(s)"). I think the userbase is steady, maybe not as popular as Vim and derivatives, but it seems like a stable amount of users. It would be nice to have a new Emacs, essentially the same concept but with better languages replacing both elisp and C, perhaps some modern Scheme that is well documented and is ready for the future of machines with more parallel processing power/the focus on concurrency as well, and whatever systems programming language (Ada, Rust, Zig?, maybe even modern C++, et al) is suitable for a small core. Perhaps some default improvements: CUA mode by default, ido replaced with a helm/ivy-like, the frumpy old I-search and the query replace replaced with a swiper-like and something similar for the query replace, an optional minimap that some people seem to love so much, new and improved tree directory frame, etc. Generally, faster, safer, easier to use by default, multithreaded and concurrency ready. But the situation isn't as messy as with Vim, theres no panic to make a NeoEmacs, the code simply doesn't suck as much as Vim's.

>>1044087

I just use Irony-server myself, it works well for me. For now, the C/C++ LSP servers are probably still much slower, but then again they are young projects. One probable reason for Microsoft doing this is to get the disparate developers to work for them indirectly, by making servers that can all be used with VSCode, instead of working on stuff specific to a text editor.


 No.1044090

>>1044072

Wouldn't human-readable make creating plugins easier? If plugins are easy to make then the protocol has a better chance of succeeding


 No.1044133>>1044360

>>1044089

>I think the userbase is steady,

>I think

Instead of doing the emacs larpathon just go look at the numbers.

>microsoft conspiracy to make text editors better

oh those dastardly faggots.


 No.1044148>>1044288

>>1044087

>All the C LSPs require an own version of clang running in the background.

There's clangd, though.


 No.1044288>>1044339

>>1044148

>There's clangd, though.

it also only supports half of the protocol


 No.1044339

>>1044288

Works fine with eglot here. You're better off with clangd >= 7, though.


 No.1044343

What's the point? Instead of making all editors better it will make all editors equally shit.


 No.1044360>>1044395

>>1044133

>Instead of doing the emacs larpathon just go look at the numbers.

I have seen them already.

>microsoft conspiracy to make text editors better

Its to make their text editor better, any other text editors improving is a side effect.


 No.1044381

>Microsoft

embrace, extend, extinguish


 No.1044395

>>1044360

> Its to make their text editor better, any other text editors improving is a side effect.

That's still a win in my book.


 No.1044403

neither eglot nor lsp-mode work. using LSP just made me want to use VS Code instead of Emacs.


 No.1044405

>>1044089

>It would be nice to have a new Emacs, essentially the same concept but with better languages replacing both elisp and C

people have been trying to do this for decades and failing. rewriting Emacs is a lot more difficult than you think.

if you want all the latest and greatest stuff, you might as well just use one of the latest and greatest editors instead of reinventing the wheel to pretend to be retro.


 No.1044454

We already had a thread on this




[Return][Go to top][Catalog][Screencap][Nerve Center][Cancer][Update] ( Scroll to new posts) ( Auto) 5
20 replies | 2 images | Page ?
[Post a Reply]
[ / / / / / / / / / / / / / ] [ dir / baphomet / caco / choroy / christ / dbv / dempart / gfl / leandro ][ watchlist ]