Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/add nix #2

Merged
merged 3 commits into from
Jul 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .busted
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
return {
_all = {
coverage = false,
lpath = "lua/?.lua;lua/?/init.lua",
lua = "nlua",
},
default = {
verbose = true
},
tests = {
verbose = true
},
}
1 change: 0 additions & 1 deletion .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@
Nothing yet :)

See [general tips for working with C++ in neovim](../docs/tips.md).

16 changes: 8 additions & 8 deletions .github/workflows/luarocks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ on:
workflow_dispatch:

jobs:
luarocks-upload:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: LuaRocks Upload
uses: nvim-neorocks/luarocks-tag-release@v5
env:
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
# luarocks-upload:
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v3
# - name: LuaRocks Upload
# uses: nvim-neorocks/luarocks-tag-release@v5
# env:
# LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*

#GH, git
!.gitignore
!.github/

# Meta
!LICENSE

# Nix
!nix/
!default.nix
!flake.nix
!flake.lock

# Plugin
!lua/
!doc/
!docs/
!ftplugin/
!*.rockspec

# Plugin test & lint
!spec/
!.busted
!.luacheckrc
10 changes: 10 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
std = "luajit"
cache = true
include_files = {"spec/**.lua", "lua/**.lua", "*.rockspec", ".luacheckrc"}

read_globals = {
"vim",
"describe",
"it",
"assert"
}
33 changes: 21 additions & 12 deletions cpp-tools.nvim-scm-1.rockspec
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
local MODREV, SPECREV = "scm", "-1"
local MODREV, SPECREV = 'scm', '-1'

package = "cpp-tools.nvim"
rockspec_format = '3.0'

package = 'cpp-tools.nvim'
version = MODREV .. SPECREV

description = {
summary = "Supercharge your C++ experience in neovim.",
homepage = "http://github.com/Dich0tomy/cpp-tools.nvim",
license = "GPL-3.0"
summary = 'Supercharge your C++ experience in neovim.',
homepage = 'http://github.com/Dich0tomy/cpp-tools.nvim',
license = 'GPL-3.0'
}

dependencies = { }

source = {
url = "http://github.com/Dich0tomy/cpp-tools.nvim/archive/v" .. MODREV .. ".zip",
url = 'http://github.com/Dich0tomy/cpp-tools.nvim/archive/v' .. MODREV .. '.zip',
}

if MODREV == "scm" then
if MODREV == 'scm' then
source = {
url = "git://github.com/Dich0tomy/cpp-tools.nvim",
url = 'git://github.com/Dich0tomy/cpp-tools.nvim',
}
end

test_dependencies = {
'lua >= 5.1',
'plenary.nvim',
'nlua',
}

dependencies = {}

build = {
type = "builtin",
type = 'builtin',
copy_directories = {
'ftplugin'
},
}
17 changes: 9 additions & 8 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
self,
vimUtils,
lib,
self,
vimUtils,
lib,
}:
vimUtils.buildVimPlugin {
pname = "cpp-tools.nvim";
version = self.shortRev or self.dirtyRev or "dirty";

src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [
./lua
];
};
root = ./.;
fileset = lib.fileset.unions [
./ftplugin
./lua
];
};
}
Loading