ruff/crates/ruff_server/src
Dhruv Manilawala 025768d303
Add Tokens newtype wrapper, TokenKind iterator (#11361)
## Summary

Alternative to #11237 

This PR adds a new `Tokens` struct which is a newtype wrapper around a
vector of lexer output. This allows us to add a `kinds` method which
returns an iterator over the corresponding `TokenKind`. This iterator is
implemented as a separate `TokenKindIter` struct to allow using the type
and provide additional methods like `peek` directly on the iterator.

This exposes the linter to access the stream of `TokenKind` instead of
`Tok`.

Edit: I've made the necessary downstream changes and plan to merge the
entire stack at once.
2024-05-14 16:45:04 +00:00
..
edit Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
server ruff server: Support noqa comment code action (#11276) 2024-05-12 14:39:46 -07:00
session ruff server: Support noqa comment code action (#11276) 2024-05-12 14:39:46 -07:00
edit.rs ruff server now supports commands for auto-fixing, organizing imports, and formatting (#10654) 2024-04-05 23:27:35 +00:00
fix.rs ruff server respects per-file-ignores configuration (#11224) 2024-05-01 19:24:35 -07:00
format.rs ruff server - A new built-in LSP for Ruff, written in Rust (#10158) 2024-03-08 20:57:23 -08:00
lib.rs ruff server: Important errors are now shown as popups (#10951) 2024-04-16 18:32:53 +00:00
lint.rs Add Tokens newtype wrapper, TokenKind iterator (#11361) 2024-05-14 16:45:04 +00:00
message.rs ruff server no longer hangs after shutdown (#11222) 2024-05-03 01:09:42 +00:00
server.rs Fix ruff server hanging after Neovim closes (#11291) 2024-05-05 17:15:48 +00:00
session.rs ruff server: Ruff configuration from client settings overrides project configuration (#11062) 2024-04-23 11:19:17 -07:00