Skip to content

Commit 3255bb0

Browse files
authored
Bundle plenary as a submodule (#18)
* Bundle plenary as a submodule Closes #7 * README and CHANGELOG
1 parent 5176c57 commit 3255bb0

File tree

14 files changed

+23
-19
lines changed

14 files changed

+23
-19
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ on:
1515
- 'v*.*.*'
1616

1717
env:
18-
plenary-git: https://github.com/nvim-lua/plenary.nvim
19-
plenary-path: ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
2018
runtime: ~/.local/share/nvim/site/pack/vendor/start
2119

2220
jobs:
@@ -86,7 +84,6 @@ jobs:
8684
mkdir -p _neovim
8785
curl -sL ${{ matrix.nvim_url }} | tar xzf - --strip-components=1 -C "${PWD}/_neovim"
8886
}
89-
git clone --depth 1 ${{ env.plenary-git }} ${{ env.plenary-path }}
9087
ln -s $(pwd) ${{ env.runtime }}
9188
9289
- name: Prepare

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[submodule "lua/deps/lua_yaml"]
22
path = lua/deps/lua_yaml
33
url = https://github.com/exosite/lua-yaml.git
4+
[submodule "lua/deps/plenary"]
5+
path = lua/deps/plenary
6+
url = https://github.com/nvim-lua/plenary.nvim.git

.styluaignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
lua/deps/lua_yaml
1+
lua/deps/
2+
lua/plenary/
3+
lua/yaml.lua

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
### Changed
11+
12+
- `plenary.nvim` is no longer required to be installed seperately. It's now bundled as a submodule.
13+
1014
## [v1.2.1](https://github.com/epwalsh/obsidian.nvim/releases/tag/v1.2.1) - 2022-09-23
1115

1216
### Added

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
TEST = test/obsidian
2+
13
.PHONY : all
24
all : style lint test
35

@@ -7,11 +9,14 @@ test :
79
--headless \
810
--noplugin \
911
-u test/minimal_init.vim \
10-
-c "PlenaryBustedDirectory test/obsidian/ { minimal_init = './test/minimal_init.vim' }"
12+
-c "PlenaryBustedDirectory $(TEST) { minimal_init = './test/minimal_init.vim' }"
1113

1214
.PHONY : lint
1315
lint :
14-
luacheck after lua --exclude-files='lua/deps/lua_yaml/*'
16+
luacheck after lua \
17+
--exclude-files='lua/deps/*' \
18+
--exclude-files='lua/plenary/*' \
19+
--exclude-files='lua/yaml.lua'
1520

1621
.PHONY : style
1722
style :

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ This is for people who love the concept of Obsidian -- a simple, markdown-based
2222
### Requirements
2323

2424
- A nightly build of NeoVim (this plugin uses `vim.fs`).
25-
- The [plenary.nvim](https://github.com/nvim-lua/plenary.nvim) plugin.
2625
- If you want completion features (recommended) you'll also need [ripgrep](https://github.com/BurntSushi/ripgrep) to be installed and on your `$PATH`.
2726
See [ripgrep#installation](https://github.com/BurntSushi/ripgrep) for install options.
2827

@@ -31,7 +30,6 @@ See [ripgrep#installation](https://github.com/BurntSushi/ripgrep) for install op
3130
Using `vim-plug`, for example:
3231

3332
```vim
34-
Plug 'nvim-lua/plenary.nvim' " required
3533
Plug 'hrsh7th/nvim-cmp' " optional, for completion
3634
Plug 'godlygeek/tabular' " optional, needed for 'preservim/vim-markdown'
3735
Plug 'preservim/vim-markdown' " optional, recommended for syntax highlighting, folding, etc if you're not using nvim-treesitter

lua/deps/init.lua

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

lua/deps/plenary

Submodule plenary added at 62dc2a7

lua/obsidian/command.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
local Path = require "plenary.path"
2-
32
local Note = require "obsidian.note"
43
local echo = require "obsidian.echo"
54
local util = require "obsidian.util"

lua/obsidian/note.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
local Path = require "plenary.path"
2+
local yaml = require "yaml"
23
local util = require "obsidian.util"
3-
local yaml = require "deps.lua_yaml.yaml"
44
local echo = require "obsidian.echo"
55

66
local SKIP_UPDATING_FRONTMATTER = { "README.md", "CONTRIBUTING.md", "CHANGELOG.md" }

lua/obsidian/util.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
local scan = require "plenary.scandir"
2+
23
local util = {}
34

45
---Check if a table (list) contains a value.

lua/plenary

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
deps/plenary/lua/plenary

lua/yaml.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
deps/lua_yaml/yaml.lua

test/minimal_init.vim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
set rtp+=.
2-
set rtp+=~/.config/nvim/plugged/plenary.nvim
3-
set rtp+=~/.config/nvim/plugged/sqlite.lua
2+
set rtp+=./lua/deps/plenary
43

54
runtime! plugin/plenary.vim

0 commit comments

Comments
 (0)