Skip to content

Commit a4b1fd2

Browse files
feat(fountain): added fountain-lsp-server
1 parent 3e87319 commit a4b1fd2

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

doc/configs.md

+29
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ Nvim by running `:help lspconfig-all`.
108108
- [flux_lsp](#flux_lsp)
109109
- [foam_ls](#foam_ls)
110110
- [fortls](#fortls)
111+
- [fountain-lsp-server](#fountain-lsp-server)
111112
- [fsautocomplete](#fsautocomplete)
112113
- [fsharp_language_server](#fsharp_language_server)
113114
- [fstar](#fstar)
@@ -4080,6 +4081,34 @@ Default config:
40804081

40814082
---
40824083

4084+
## fountain-lsp-server
4085+
4086+
https://github.com/oparaskos/fountain-lsp-server
4087+
4088+
This is a Language Server for fountain files, a simple markup syntax for writing, editing, and sharing screenplays in plain, human-readable text.
4089+
4090+
Snippet to enable the language server:
4091+
```lua
4092+
require'lspconfig'.fountain-lsp-server.setup{}
4093+
```
4094+
4095+
Default config:
4096+
- `cmd` :
4097+
```lua
4098+
{ 'fountain-lsp-server', '--stdio' },
4099+
```
4100+
- `filetypes` :
4101+
```lua
4102+
{ "fountain" }
4103+
```
4104+
- `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/fountain-lsp-server.lua:4](../lua/lspconfig/configs/fortls.lua#L4)
4105+
- `settings` :
4106+
```lua
4107+
{}
4108+
```
4109+
4110+
---
4111+
40834112
## fsautocomplete
40844113

40854114
https://github.com/fsharp/FsAutoComplete
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
local util = require 'lspconfig.util'
2+
3+
return {
4+
default_config = {
5+
cmd = { 'fountain-lsp-server', '--stdio' },
6+
filetypes = {
7+
'fountain',
8+
},
9+
root_dir = function(fname)
10+
local root_files = { '.fountainrc' }
11+
return util.root_pattern(unpack(root_files))(fname)
12+
or vim.fs.dirname(vim.fs.find('.git', { path = fname, upward = true })[1])
13+
end,
14+
single_file_support = true,
15+
},
16+
docs = {
17+
description = [[
18+
https://github.com/oparaskos/fountain-lsp-server
19+
20+
This is a Language Server for fountain files, a simple markup syntax for writing, editing, and sharing screenplays in plain, human-readable text.
21+
22+
The language server is built on vscode-languageserver but should be flexible to use with other IDEs.
23+
24+
- Code Completions for Title Page attributes, scene headings, etc.
25+
- CodeLens support for characters, scenes and locations.
26+
- Statistics to be consumed by a webview, by character, location and scene; and more granularly by character gender and race.
27+
28+
If installed through NPM then there should be a binary fountain-lsp-server in node_modules/.bin
29+
30+
Otherwise you can use node dist/bundle.cjs.js [options] from the package file in GitHub releases or import dist/server from the node module to roll it into your own application.
31+
32+
The project introduces the concept of a .fountainrc file to specify additional details about characters, the schema for which is in the root of this project.
33+
34+
The extension will also attempt to guess gender of characters based on name, this only supports en and it locales and makes incorrect assumptions often (e.g. Sam is always regarded as a male name, even though it can be a shortened form of Samantha), but provides a reasonable basis as a default to be overriden.
35+
]],
36+
},
37+
}

0 commit comments

Comments
 (0)