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

docs: add asm-lsp #2400

Merged
merged 3 commits into from
Jan 25, 2024
Merged

docs: add asm-lsp #2400

merged 3 commits into from
Jan 25, 2024

Conversation

WillLillis
Copy link
Contributor

Hi! Would it be possible to add asm-lsp to the docs?

I wasn't super sure what to list for the selectors in the configuration. Checking the selector on my test files (see samples/ in the project's repo) yielded text.plain. I tried finding a more comprehensive lists of scopes to use a more assembly-specific scope, but the best I could find was this stack overflow post. The post listed source.disasm, but I struggled to find a file that used that. I tested the configuration as-is and it works, but I'm happy to change anything if I've made a mistake :)

@jwortmann
Copy link
Member

jwortmann commented Jan 25, 2024

A quick search on the Package Control website lists NASM x​86 Assembly and x​86 and x​86_64 Assembly as two popupar syntax highlighting packages for assembly languages, and they use the scope names source.assembly and source.asm. I do think that text.plain should be removed, so I would probably use "selector": "source.asm | source.assembly", assuming that files highlighted by the mentioned syntax packages are applicable for this LSP server.

Disclaimer: I'm not very familiar with assembly, and those syntaxes aren't applied to the .s file extension from the sample files by default, so there may possibly be more suitable alternatives (?)

The h2 heading is supposed to be the language name, so I would probably put ## Assembly there instead of ## ASM LSP (if another asm server gets added to the docs in the future, we can add another subheading with the server names).

@rchl
Copy link
Member

rchl commented Jan 25, 2024

BTW. based on this search I would guess that the server doesn't care about the language ID.

@WillLillis
Copy link
Contributor Author

I would probably use "selector": "source.asm | source.assembly"

After installing the two packages you linked the selector for the file showed up as source.asm.x86_64. The highlights were also applied to the files. Thanks!

The h2 heading is supposed to be the language name, so I would probably put ## Assembly there instead of ## ASM LSP

Makes sense! Sorry about that

@WillLillis
Copy link
Contributor Author

WillLillis commented Jan 25, 2024

BTW. based on this search I would guess that the server doesn't care about the language ID.

That would be correct. I've contributed a couple features to the server recently and we don't have any strict language requirements. :)

docs/src/language_servers.md Outdated Show resolved Hide resolved
@rchl rchl changed the title feat: add asm-lsp to docs docs: add asm-lsp Jan 25, 2024
@rchl rchl merged commit 0842092 into sublimelsp:main Jan 25, 2024
@WillLillis WillLillis deleted the asm-lsp branch January 25, 2024 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants