Skip to content

Commit 26b839a

Browse files
committed
update mason setup guide update
1 parent 8c88563 commit 26b839a

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@
1919

2020
Or with [Packer](https://github.com/wbthomason/packer.nvim): add `use 'wakatime/vim-wakatime'` to your plugins file.
2121

22+
Or with [Lazy](https://github.com/folke/lazy.nvim.git): add to your plugins file.
23+
```lua
24+
{
25+
"wakatime/vim-wakatime",
26+
lazy=false,
27+
setup = function ()
28+
vim.cmd([[packadd wakatime/vim-wakatime]])
29+
end
30+
}
31+
```
32+
2233
2. Enter your [api key](https://wakatime.com/settings#apikey), then press `enter`.
2334

2435
3. Use Vim and your coding activity will be displayed on your [WakaTime dashboard](https://wakatime.com).
@@ -31,6 +42,48 @@
3142

3243
## Configuring
3344

45+
### Here is a more detailed Lazy configuration.
46+
First add wakatime to your plugins.
47+
```lua
48+
{
49+
"wakatime/vim-wakatime",
50+
lazy=false,
51+
setup = function ()
52+
vim.cmd([[packadd wakatime/vim-wakatime]])
53+
end
54+
}
55+
```
56+
57+
#### Setting Up Wakatime CLI
58+
Follow these steps to set up the Wakatime CLI manually for optimal integration:
59+
60+
1. Clone the Wakatime CLI repository:
61+
62+
```sh
63+
git clone [email protected]:wakatime/wakatime-cli.git ~/wakatime-cli
64+
# or
65+
git clone https://github.com/wakatime/wakatime-cli.git ~/wakatime-cli
66+
```
67+
68+
2. Build the Wakatime CLI using Go or install the binary [here](http://github.com/shadmeoli/nvim_wakatime_setup).
69+
70+
```sh
71+
cd ~/wakatime-cli
72+
go build
73+
mv wakatime-cli ~/.wakatime/wakatime-cli
74+
```
75+
76+
Ensure the generated binary is moved to the `.wakatime` folder.
77+
78+
If the folder doesn't exist, run Neovim to install the plugin with Mason which will create the .wakatime folder at root, then quit Neovim or alternatively create the `.wakatime` folder manually and re-run the build process.
79+
80+
```sh
81+
mkdir ~/.wakatime
82+
cd ~/wakatime-cli
83+
go build
84+
mv wakatime-cli ~/.wakatime/wakatime-cli
85+
```
86+
3487
#### Commands:
3588

3689
* `:WakaTimeApiKey` - change the api key saved in your `~/.wakatime.cfg`

0 commit comments

Comments
 (0)