mirror of
https://github.com/Ascyii/typstar.git
synced 2026-01-01 05:24:24 -05:00
docs: minor fixes
This commit is contained in:
58
README.md
58
README.md
@@ -75,42 +75,13 @@ present in Anki
|
||||
|
||||
|
||||
## Installation
|
||||
Install the plugin in Neovim and run the plugin setup.
|
||||
Install the plugin in Neovim (see [Nix instructions](#in-a-nix-flake-optional)) and run the plugin setup.
|
||||
```lua
|
||||
require('typstar').setup({ -- depending on your neovim plugin system
|
||||
-- your typstar config goes here
|
||||
})
|
||||
```
|
||||
|
||||
### In a Nix Flake
|
||||
You can add typstart to your `nix-flake` like so:
|
||||
```nix
|
||||
# `flake.nix`
|
||||
inputs = {
|
||||
# ... other inputs
|
||||
typstar = {
|
||||
url = "github:arne314/typstar";
|
||||
flake = false;
|
||||
};
|
||||
}
|
||||
```
|
||||
Now you can use `typstar` in any package-set
|
||||
```nix
|
||||
with pkgs [
|
||||
#
|
||||
# other packges ...
|
||||
#
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
name = "typstar";
|
||||
src = inputs.typstar;
|
||||
buildInputs = [
|
||||
vimPlugins.luasnip
|
||||
vimPlugins.nvim-treesitter-parsers.typst
|
||||
];
|
||||
})
|
||||
]
|
||||
```
|
||||
|
||||
### Snippets
|
||||
1. Install [LuaSnip](https://github.com/L3MON4D3/LuaSnip/), set `enable_autosnippets = true` and set a visual mode selection key (e.g. `store_selection_keys = '<Tab>'`) in the configuration
|
||||
2. Install [jsregexp](https://github.com/kmarius/jsregexp) as described [here](https://github.com/L3MON4D3/LuaSnip/blob/master/DOC.md#transformations) (You will see a warning on startup if jsregexp isn't installed properly)
|
||||
@@ -130,6 +101,33 @@ with pkgs [
|
||||
3. Install the typstar python package (I recommend using [pipx](https://github.com/pypa/pipx) via `pipx install git+https://github.com/arne314/typstar`, you will need to have python build tools and clang installed) \[Note: this may take a while\]
|
||||
4. Make sure the `typstar-anki` command is available in your `PATH` or modify the `typstarAnkiCmd` option in the [config](#configuration)
|
||||
|
||||
### In a Nix Flake (optional)
|
||||
You can add typstar to your `nix-flake` like so
|
||||
```nix
|
||||
# `flake.nix`
|
||||
inputs = {
|
||||
# ... other inputs
|
||||
typstar = {
|
||||
url = "github:arne314/typstar";
|
||||
flake = false;
|
||||
};
|
||||
}
|
||||
```
|
||||
Now you can use `typstar` in any package-set
|
||||
```nix
|
||||
with pkgs; [
|
||||
# ... other packges
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
name = "typstar";
|
||||
src = inputs.typstar;
|
||||
buildInputs = [
|
||||
vimPlugins.luasnip
|
||||
vimPlugins.nvim-treesitter-parsers.typst
|
||||
];
|
||||
})
|
||||
]
|
||||
```
|
||||
|
||||
## Configuration
|
||||
Configuration options can be intuitively derived from the table [here](./lua/typstar/config.lua).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user