Skip to content

Commit

Permalink
fix: filetype docs (nvim-lua#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
Conni2461 authored Dec 30, 2020
1 parent ec87b00 commit 22127c4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ Will detect the filetype based on `extension`/`special filename`/`shebang` or `m
- `require'plenary.filetype'.detect_from_modeline(filepath)`
- `require'plenary.filetype'.detect_from_shebang(filepath)`

You can add more extensions to the filetypeguesser locally:
Create file `~/.config/nvim/data/plenary/filetypes/builtin.lua` and add following:
Add filetypes by creating a new file named `~/.config/nvim/data/plenary/filetypes/foo.lua` and register that file with
`:lua require'plenary.filetype'.add_file('foo')`. Content of the file should look like that:
```lua
return {
extension = {
Expand All @@ -124,9 +124,6 @@ return {
}
```

You can also name the file like you want, the file just has to be inside the directory `data/plenary/filetypes/`
inside your runtimepath. If you wanna do this you have to run: `:lua require'plenary.filetype'.add_file(your_desired_filename)`.

### plenary.popup

`popup_*` clone of Vim's commands. If it gets good enough, will submit PR to Neovim and write C wrappers
Expand Down

0 comments on commit 22127c4

Please sign in to comment.