Skip to content

Commit adeb2a3

Browse files
committed
docs: Update readme
1 parent 1864075 commit adeb2a3

File tree

2 files changed

+75
-51
lines changed

2 files changed

+75
-51
lines changed

README.md

Lines changed: 46 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<div align="center">
99

10-
An R language server, linter, and code formatter, written in Rust.
10+
An R language server, linter, and code formatter written in Rust.
1111
<br />
1212
[Docs](https://roughly.felixandreas.me) · [Releases](https://github.com/felix-andreas/roughly/releases) · [VS Code Extension](https://marketplace.visualstudio.com/items?itemName=felix-andreas.roughly)
1313

@@ -20,27 +20,32 @@ An R language server, linter, and code formatter, written in Rust.
2020

2121
Roughly aims to support the following language server features (some are experimental or in progress):
2222

23-
- **Code Navigation**
24-
- Goto definition (🧪 experimental)
25-
- Search current document (<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>O</kbd> *in VS Code*)
26-
- Search global workspace (<kbd>Ctrl</kbd> + <kbd>T</kbd> *in VS Code*)
27-
- Indexing of global symbols, S4 classes/generics/methods and R6 classes/methods
23+
- **Formatting**
24+
- Format entire document
25+
- Format selected code range *(🧪 experimental)*
26+
27+
- **Navigation**
28+
- Index global variables, S4 and R6 classes/methods
29+
- Search current document - <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>O</kbd> *in VS Code*
30+
- Search global workspace - <kbd>Ctrl</kbd> + <kbd>T</kbd> *in VS Code*
31+
- Go to definition *(🧪 experimental)*
32+
- Find all references *(🧪 experimental)*
2833

2934
- **Diagnostics**
30-
- Syntax errors (including missing or trailing commas)
31-
- Basic linting rules (e.g. `<-` assignment and variable naming)
32-
- Unused variables (🧪 experimental)
35+
- Syntax errors - *including missing or trailing commas*
36+
- Basic linting rules - *[full list here](https://roughly.felixandreas.me/linter/#semantics-checks)*
37+
- Warning for unused variables *(🧪 experimental)*
38+
- Error for undefined variable *(⚠️ missing)*
39+
- Argument validation for function calls *(⚠️ missing)*
40+
- Type checking *([💡 early design phase](crates/typing/README.md))*
41+
42+
- **Editing**
43+
- Autocomplete local and global variables
44+
- Autocomplete variables from other packages *(⚠️ missing)*
45+
- Rename local variables *(🧪 experimental)*
46+
- Rename global variables *(⚠️ missing)*
47+
- Signature help *(🔨 work in progress)*
3348

34-
- **Formatting**
35-
- Entire documents
36-
- Selected ranges (🧪 experimental)
37-
38-
- **Code Completion**
39-
- Local symbols
40-
- Global symbols
41-
- Package symbols (⚠️ missing)
42-
- Signature help (⚠️ missing)
43-
4449
## Roughly CLI
4550

4651
You can install the Roughly CLI by downloading a pre-built binary or by building from source.
@@ -51,21 +56,21 @@ Download the pre-built binary for your platform from the [releases page](https:/
5156

5257
### Build from Source
5358

54-
Alternatively, build from source (requires the Rust nightly):
59+
Alternatively, build from source (requires Rust nightly):
5560

5661
```sh
5762
cargo build --release
5863
```
5964

6065
### Usage
6166

62-
Run roughly as a formatter:
67+
Run Roughly as a formatter:
6368

6469
```
6570
roughly fmt # Format all files in the current directory
6671
roughly fmt <path> # Format all files in `<path>`
6772
roughly fmt --check # Only check if files would be formatted
68-
roughly fmt --diff # Only show diff if files would be formatted
73+
roughly fmt --diff # Only show the diff if files would be formatted
6974
```
7075

7176
To run Roughly as a linter:
@@ -87,13 +92,9 @@ Roughly can also be used as a VS Code extension.
8792

8893
### From Marketplace (Recommended)
8994

90-
Install directly from VS Code:
91-
- Open VS Code
92-
- Press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>X</kbd> to open Extensions
93-
- Search for "roughly"
94-
- Click "Install" on the extension by `felix-andreas`
95+
[![](https://vsmarketplacebadges.dev/version-short/felix-andreas.roughly.svg)](https://marketplace.visualstudio.com/items?itemName=felix-andreas.roughly)
9596

96-
Or, install using the [VS Code Marketplace website](https://marketplace.visualstudio.com/items?itemName=felix-andreas.roughly).
97+
Install the extension from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=felix-andreas.roughly).
9798

9899
> [!NOTE]
99100
> The VS Code extension from the marketplace includes a bundled version of the Roughly CLI **only for Windows and Linux x64**. If you are using macOS or a different architecture, you will need to install the Roughly CLI manually.
@@ -116,13 +117,12 @@ code --install-extension roughly.vsix
116117

117118
You can customize the Roughly extension in VS Code through the following settings:
118119

119-
120120
```jsonc
121121
{
122122
// Use a custom binary instead of the bundled one
123123
"roughly.path": "/path/to/roughly",
124-
// Pass extra arguments to the language server
125-
"roughly.args": ["server", "--extra", "arg"],
124+
// Pass custom arguments; defaults to ["server"]
125+
"roughly.args": ["server", "--verbose"],
126126
// Enable experimental features
127127
"roughly.experimentalFeatures": ["goto_definition", "range_formatting"],
128128
}
@@ -135,42 +135,43 @@ You can customize the Roughly extension in VS Code through the following setting
135135

136136
You can access Roughly-specific commands in VS Code via the Command Palette (<kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd>):
137137

138-
- **Roughly: Start/Stop/Restart Server**
139138
- **Roughly: Open logs**
139+
- **Roughly: Start/Stop/Restart Server**
140+
- **Roughly: Format workspace** (⚠️ missing)
141+
- **Roughly: Show syntax tree** (⚠️ missing)
140142

141143
## RStudio Integration
142144

143145
Roughly can be used as an external formatter in RStudio. See the [RStudio setup guide](https://roughly.felixandreas.me/getting-started/#rstudio-formatter-only) for detailed instructions.
144146

145147
## Configuration
146148

147-
You can configure roughly via a project-specific `roughly.toml` file:
149+
You can configure Roughly via a project-specific `roughly.toml` file:
148150

149151
```toml
150152
[format]
151-
# number of spaces per indentation level
153+
# Number of spaces per indentation level
152154
indent-width = 4
153-
# automatically detect the appropriate line ending
155+
# Automatically detect the appropriate line ending
154156
line-ending = "auto" # "lf" or "cr-lf"
155157

156158
[lint]
157-
# control the naming convention for variables and parameters
159+
# Control the naming convention for variables and parameters
158160
naming-style = "snake_case" # or "camelCase", omit to disable this lint entirely
159161
```
160162

161163
## Experimental Features
162164

163165
Roughly includes several experimental features that can be enabled in the VS Code extension settings or via the CLI:
164166

165-
166-
| Name | Description |
167-
| ------------------ | --------------------------------- |
168-
| `all` | Enables all experimental features |
169-
| `goto_definition` | Jump to symbol definitions |
170-
| `goto_references` | Find all references to a symbol |
171-
| `range_formatting` | Format selected code ranges |
172-
| `rename` | Rename symbols |
173-
| `unused` | Detect unused variables |
167+
| Name | Description |
168+
| ------------------ | -------------------------------- |
169+
| `all` | Enable all experimental features |
170+
| `goto_definition` | Jump to symbol definitions |
171+
| `goto_references` | Find all references to a symbol |
172+
| `range_formatting` | Format selected code ranges |
173+
| `rename` | Rename symbols |
174+
| `unused` | Warn about unused variables |
174175

175176
## Development
176177

editors/code/README.md

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,33 @@ This extension provides support for the [R programming language](https://www.r-p
77
88
## Features
99

10-
* Autocomplete
11-
* Code Formatting
12-
* Syntax Diagnostics
13-
* Workspace Symbol Search
10+
Roughly aims to support the following language server features (some are experimental or in progress):
11+
12+
- **Formatting**
13+
- Format entire document
14+
- Format selected code range *(🧪 experimental)*
15+
16+
- **Navigation**
17+
- Index global variables, S4 and R6 classes/methods
18+
- Search current document - <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>O</kbd> *in VS Code*
19+
- Search global workspace - <kbd>Ctrl</kbd> + <kbd>T</kbd> *in VS Code*
20+
- Go to definition *(🧪 experimental)*
21+
- Find all references *(🧪 experimental)*
22+
23+
- **Diagnostics**
24+
- Syntax errors - *including missing or trailing commas*
25+
- Basic linting rules - *[full list here](https://roughly.felixandreas.me/linter/#semantics-checks)*
26+
- Warning for unused variables *(🧪 experimental)*
27+
- Error for undefined variable *(⚠️ missing)*
28+
- Argument validation for function calls *(⚠️ missing)*
29+
- Type checking *([💡 early design phase](crates/typing/README.md))*
30+
31+
- **Editing**
32+
- Autocomplete local and global variables
33+
- Autocomplete variables from other packages *(⚠️ missing)*
34+
- Rename local variables *(🧪 experimental)*
35+
- Rename global variables *(⚠️ missing)*
36+
- Signature help *(🔨 work in progress)*
1437

1538
## Usage
1639

@@ -24,8 +47,8 @@ You can customize the Roughly extension in VS Code through the following setting
2447
{
2548
// Use a custom binary instead of the bundled one
2649
"roughly.path": "/path/to/roughly",
27-
// Pass extra arguments to the language server
28-
"roughly.args": ["server", "--extra", "arg"],
50+
// Pass custom arguments; defaults to ["server"]
51+
"roughly.args": ["server", "--verbose"],
2952
// Enable experimental features
3053
"roughly.experimentalFeatures": ["goto_definition", "range_formatting"],
3154
}

0 commit comments

Comments
 (0)