Skip to content

Commit a60985f

Browse files
committed
feat(v1.0.2): release
1 parent c3f5e8a commit a60985f

File tree

12 files changed

+284
-124
lines changed

12 files changed

+284
-124
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: Contact
4-
url: https://email:[email protected]
4+
url: mailto:[email protected]
55
about: For any suggestions or questions send email to

.github/ISSUE_TEMPLATE/issue-bug.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ body:
2424
- type: textarea
2525
id: issue-env
2626
attributes:
27-
label: Setup
28-
placeholder: platform, system version, tools version...
27+
label: Versions
28+
placeholder: "Specify all relevant VERSIONS"
2929
value: "."
3030
validations:
3131
required: false

.stylua.toml

Lines changed: 0 additions & 6 deletions
This file was deleted.

DEVELOPMENT.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# DEVELOPMENT
22
This project is developed by using various developer tools. For runtime dependencies see [BUILD](#BUILD) subsection.
3+
* [GIT SCM/VCS](https://git-scm.com/)
34
* IDE/Editor: [Neovim], Vim, KDE Kate, VS Code etc.
45
* System: Linux-based, e.g. Debian (U/Kubuntu) or alike
56
* Shell: zsh or bash
@@ -8,12 +9,18 @@ This project is developed by using various developer tools. For runtime dependen
89
[Neovim]: https://github.com/neovim/neovim
910

1011
> _See also: .md files in \`src/\` folder._
12+
## GIT WORKFLOW
13+
It's highly likely that this project is going to be
14+
[force-pushed](https://git-scm.com/docs/git-push#Documentation/git-push.txt)
15+
and aggressively [squash-rebased](https://git-scm.com/docs/git-rebase) into specific semver versions.
16+
Take into account this fact when making a PR: it is likely render your
17+
base-commits obsolete.
18+
1119
## BUILD
1220
### Dev dependencies
1321
* **[GNU Make](https://www.gnu.org/software/make/)** - required for `make` command; should be already installed on *nix systems
14-
* **[ts-vimdoc](https://github.com/ibhagwan/ts-vimdoc.nvim)** - the tool is used to generate doc/*.txt files from README.md
22+
* **[ts-vimdoc](https://github.com/ibhagwan/ts-vimdoc.nvim)** - the tool is used to generate `doc/*.txt` files from `*.md`
1523
* **[LuaFormatter](https://github.com/Koihik/LuaFormatter)** - lua code formatter; much faster than `stylua`
16-
quick install via npm: `npm i -g stylua`
1724

1825
### Runtime dependencies
1926

Makefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ doc/$(PROJECT_NAME).txt: doc/index.md
1818
})
1919
os.exit()
2020
"
21-
:
22-
@command -v unicode-emoji-remove.sh &> /dev/null || {
23-
# Use 2> error.log to read the output of the command
24-
echo -e "$0: $(tput setaf 1)error:$(tput op) unicode-emoji-remove.sh is nout found; install it from @gtihub:hinell/dotfiles" > /dev/stderr;
21+
command -v unicode-emoji-remove.sh &> /dev/null || {
22+
# Use 2> error.log to read the output of the command
23+
echo -e "$0: $(tput setaf 1)error:$(tput op) unicode-emoji-remove.sh is nout found; install it from" \
24+
"https://github.com/hinell/dotfiles/blob/main/bash-scripts/unicode-emoji-remove.sh" \
25+
> /dev/stderr;
2526
}
26-
@unicode-emoji-remove.sh -i $@
27-
@sed -E -i -e 's/<\/br>\s*/\n/' $@
27+
test -f $< && unicode-emoji-remove.sh -i $@
28+
sed -E -i -e 's/<\/br>\s*/\n/' $@

README.md

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
## Overview
1616

1717
Some LSP servers are terribly inefficient at memory management and can
18-
easily take up hunders RAM MBs if let unattended (just like VS Code). This plugin prevents
19-
excessive memory usage by restarting automatically stopped LSP servers on demand
20-
keeping neovim fast.
18+
easily take up gigabytes of RAM MBs if left unattended (just like VS Code huh?!).
19+
This plugin prevents excessive memory usage by stopping and restarting LSP servers
20+
automatically upon gaining or loosing window focus, keeping neovim fast.
2121

2222

2323
## ⚡Features
@@ -27,13 +27,11 @@ keeping neovim fast.
2727

2828
## 🔒Requirements
2929

30-
- [Neovim 0.8+](https://github.com/neovim/neovim/releases)
30+
- [Neovim 0.7.2+](https://github.com/neovim/neovim/releases)
3131
- [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig)
3232

3333
## 📦 Installation
3434

35-
Use your favorite plugin manager, and then call `require("lsp-timeout.nvim").setup()`.
36-
3735
#### [packer.nvim](https://github.com/wbthomason/packer.nvim)
3836
```lua
3937
-- $HOME/.config/nvim/lua/user/init.lua
@@ -43,7 +41,7 @@ packer.setup(function(use)
4341
requires={ "neovim/nvim-lspconfig" },
4442
setup = function()
4543
vim.g["lsp-timeout-config"] = {
46-
...
44+
-- ...
4745
}
4846
end
4947
})
@@ -68,16 +66,6 @@ Plug "hinell/lsp-timeout.nvim"
6866
<!-- ## 🚀 Usage -->
6967

7068

71-
## ⚙️ Configuration
72-
See [DOCUMENTATION]
73-
74-
### Troubleshooting
75-
There might some limitations however with LSP servers which don't keep cache
76-
on hdd. Some plugins that require active LSP servers like those used for signs
77-
may fail. Please, fill the issue for the respective plugin so they check against
78-
`vim.lsp.get_clients(...)`.
79-
80-
8169
### [DOCUMENTATION]
8270
### [CONTRIBUTING]
8371
### [DEVELOPMENT]

doc/index.md

Lines changed: 48 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,85 @@
11
## OVERVIEW
2-
Nvim plugin for nvim-lspconfig: stop idle servers & restart upon focus; keep your RAM usage low
2+
Nvim plugin for nvim-lspconfig: stop idle servers & restart upon gaining or loosing focus;
3+
keep your RAM usage low;
34

45

56
## INSTALL
67
Use your favorite package manager (Packer, Plug, Lazy.nvim etc.)
78

89
```
9-
"hinell/lsp-timeout.nvim",
10+
"hinell/lsp-timeout.nvim"
1011
```
1112

1213
Prerequisites:
13-
```
14-
"neovim/nvim-lspconfig"
15-
```
14+
15+
* Neovim v0.7.2+
16+
* `"neovim/nvim-lspconfig"`
1617

1718
E.g. for packer:
1819
```lua
1920
-- $HOME/.config/nvim/lua/user/init.lua
21+
-- Don't forget to run :PackerCompile
2022
packer.setup(function(use)
2123
use({
22-
"hinell/lsp-timeout.nvim",
23-
requires={ "neovim/nvim-lspconfig" },
24+
"hinell/lsp-timeout.nvim",
25+
requires={ "neovim/nvim-lspconfig" },
2426
setup = function()
2527
vim.g["lsp-timeout-config"] = {
26-
...
28+
--
2729
}
2830
end
2931
})
3032
end)
3133
```
34+
35+
Lazy.nvim:
36+
37+
```lua
38+
{
39+
"hinell/lsp-timeout.nvim",
40+
dependencies={ "neovim/nvim-lspconfig" },
41+
init = function()
42+
vim.g["lsp-timeout-config"] = {
43+
--
44+
}
45+
end
46+
}
47+
```
48+
49+
## UPDATE
50+
51+
You may want to reinstall this plugin manually because of specific dev-approach:
52+
repo of this plugin may be force-pushed & force-rebased,
53+
rendering all previous commits obsolete; read DEVELOPMENT.md for more info
54+
3255
<!-- ## API -->
3356
## CONFIGURATION
3457
```lua
3558
vim.g["lsp-timeout-config"] = {
36-
-- When focus is lost
37-
-- wait 5 minutes before stopping all LSP servers
38-
stopTimeout=1000 * 60 * 5,
39-
startTimeout=1000 * 10
59+
stopTimeout = 1000 * 60 * 5, -- ms, timeout before stopping all LSP servers
60+
startTimeout = 1000 * 10, -- ms, timeout before restart
61+
silent = false -- true to suppress notifications
4062
}
4163
```
4264

65+
### TROUBLESHOOTING
66+
67+
> **Note** IF SOME PLUGIN FAILED BECAUSE OF STOPPED LSP, PLEASE, FILL AN ISSUE IN THE RESPECTIVE PLUGIN REPO
68+
69+
* Some LSP servers which don't keep cache on hdd may fail.
70+
* Some plugins that require active LSP servers like those used for signs may also fail:
71+
if they don't hook into |LspAttach| or |LspDetach| events or if they don't use `vim.lsp.get_clients(...)`.
72+
73+
#### null-ls
74+
75+
Please, see https://github.com/hinell/lsp-timeout.nvim/issues/7#issuecomment-1764402683
76+
77+
4378
<!-- ## EXAMPLES -->
4479
<!-- ## KEYBINDINGS -->
4580
<!-- ## LEGENDARY -->
4681

4782
----
4883

49-
September 16, 2023</br>
84+
September 26, 2023</br>
5085
Copyright © - Alexander Davronov, et.al.<br>

doc/lsp-timeout.txt

Lines changed: 57 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1-
*lsp-timeout.txt* Last change: 2023 September 29
1+
*lsp-timeout.txt* Last change: 2023 October 16
22

33
==============================================================================
44
Table of Contents *lsp-timeout-table-of-contents*
55

66
OVERVIEW .............................................. |lsp-timeout-overview|
77
INSTALL ................................................ |lsp-timeout-install|
8+
UPDATE .................................................. |lsp-timeout-update|
89
CONFIGURATION .................................... |lsp-timeout-configuration|
10+
TROUBLESHOOTING ................................ |lsp-timeout-troubleshooting|
11+
null-ls ................................................ |lsp-timeout-null-ls|
912

1013
------------------------------------------------------------------------------
1114
OVERVIEW *lsp-timeout-overview*
1215

1316

14-
Nvim plugin for nvim-lspconfig: stop idle servers & restart upon focus; keep
15-
your RAM usage low
17+
Nvim plugin for nvim-lspconfig: stop idle servers & restart upon gaining or
18+
loosing focus; keep your RAM usage low;
1619

1720

1821
------------------------------------------------------------------------------
@@ -22,43 +25,82 @@ INSTALL *lsp-timeout-install*
2225
Use your favorite package manager (Packer, Plug, Lazy.nvim etc.)
2326

2427
>
25-
"hinell/lsp-timeout.nvim",
28+
"hinell/lsp-timeout.nvim"
2629
<
2730
Prerequisites:
2831

29-
>
30-
"neovim/nvim-lspconfig"
31-
<
32+
* Neovim v0.7.2+
33+
* `"neovim/nvim-lspconfig"`
3234
E.g. for packer:
3335

3436
>lua
3537
-- $HOME/.config/nvim/lua/user/init.lua
38+
-- Don't forget to run :PackerCompile
3639
packer.setup(function(use)
3740
use({
38-
"hinell/lsp-timeout.nvim",
39-
requires={ "neovim/nvim-lspconfig" },
41+
"hinell/lsp-timeout.nvim",
42+
requires={ "neovim/nvim-lspconfig" },
4043
setup = function()
4144
vim.g["lsp-timeout-config"] = {
42-
...
45+
--
4346
}
4447
end
4548
})
4649
end)
4750
<
51+
Lazy.nvim:
52+
53+
>lua
54+
{
55+
"hinell/lsp-timeout.nvim",
56+
dependencies={ "neovim/nvim-lspconfig" },
57+
init = function()
58+
vim.g["lsp-timeout-config"] = {
59+
--
60+
}
61+
end
62+
}
63+
<
64+
65+
------------------------------------------------------------------------------
66+
UPDATE *lsp-timeout-update*
67+
68+
69+
You may want to reinstall this plugin manually because of specific
70+
dev-approach: repo of this plugin may be force-pushed & force-rebased,
71+
rendering all previous commits obsolete; read DEVELOPMENT.md for more info
72+
4873

4974
------------------------------------------------------------------------------
5075
CONFIGURATION *lsp-timeout-configuration*
5176

5277

5378
>lua
5479
vim.g["lsp-timeout-config"] = {
55-
-- When focus is lost
56-
-- wait 5 minutes before stopping all LSP servers
57-
stopTimeout=1000 * 60 * 5,
58-
startTimeout=1000 * 10
80+
stopTimeout = 1000 * 60 * 5, -- ms, timeout before stopping all LSP servers
81+
startTimeout = 1000 * 10, -- ms, timeout before restart
82+
silent = false -- true to suppress notifications
5983
}
6084
<
61-
September 16, 2023
85+
86+
87+
TROUBLESHOOTING *lsp-timeout-troubleshooting*
88+
89+
**Note** IF SOME PLUGIN FAILED BECAUSE OF STOPPED LSP, PLEASE, FILL AN ISSUE
90+
IN THE RESPECTIVE PLUGIN REPO
91+
92+
* Some LSP servers which don't keep cache on hdd may fail.
93+
* Some plugins that require active LSP servers like those used for signs may
94+
also fail: if they don't hook into |LspAttach| or |LspDetach| events or if
95+
they don't use `vim.lsp.get_clients(...)`.
96+
97+
98+
NULL-LS *lsp-timeout-null-ls*
99+
100+
Please, see
101+
https://github.com/hinell/lsp-timeout.nvim/issues/7#issuecomment-1764402683
102+
103+
September 26, 2023
62104
Copyright - Alexander Davronov, et.al.<br>
63105

64106

doc/tags

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
lsp-timeout-configuration lsp-timeout.txt /*lsp-timeout-configuration*
22
lsp-timeout-install lsp-timeout.txt /*lsp-timeout-install*
3+
lsp-timeout-null-ls lsp-timeout.txt /*lsp-timeout-null-ls*
34
lsp-timeout-overview lsp-timeout.txt /*lsp-timeout-overview*
45
lsp-timeout-table-of-contents lsp-timeout.txt /*lsp-timeout-table-of-contents*
6+
lsp-timeout-troubleshooting lsp-timeout.txt /*lsp-timeout-troubleshooting*
7+
lsp-timeout-update lsp-timeout.txt /*lsp-timeout-update*
58
lsp-timeout.txt lsp-timeout.txt /*lsp-timeout.txt*

0 commit comments

Comments
 (0)