Skip to content

Commit

Permalink
adding a bunch of small config/workflow changes
Browse files Browse the repository at this point in the history
  • Loading branch information
clpi committed Nov 23, 2024
1 parent 5f8f634 commit d02c752
Show file tree
Hide file tree
Showing 19 changed files with 82 additions and 288 deletions.
18 changes: 5 additions & 13 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
# These are supported funding model platforms

liberapay:
open_collective: # Replace with a single Open Collective username
github: ["clpi"] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
patreon:

community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username

liberapay: https://opencollective.com/clp
open_collective: https://opencollective.com/clp
github: [clpi]
ko_fi: https://ko-fi.com/clp
patreon: https://patreon.com/clpi
custom: ["clp.is"]
30 changes: 0 additions & 30 deletions .github/workflows/release.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ ext/
/.luarocks
.direnv
.pre-commit-config.yaml
/doc/tags
**.book/
Empty file added .gitmodules
Empty file.
2 changes: 2 additions & 0 deletions .stylua.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ indent_type = "Spaces"
indent_width = 2
quote_style = "AutoPreferDouble"
no_call_parentheses = false
[sort_requires]
enabled = true
10 changes: 10 additions & 0 deletions .styluaignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
index.md
.vscode
lib/
**node_modules
ext/
**.ropeproject/
**notes/
/luarocks
/lua_modules
/.luarocks
.direnv
.pre-commit-config.yaml
/doc/tags
**.book/
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
```vim
Plug "nvim-telescope/telescope.nvim"
Plug "nvim-treesitter/treesitter.nvim"
Plug "nvim-lua/plenary.nvim",
Plug "MunifTanjim/nui.nvim",
Plug "pysan3/pathlib.nvim"
Expand Down
12 changes: 12 additions & 0 deletions autoload/health.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
H = {}

local health = vim.health
local healthp = vim.provider.health
local start, ok, warn, error, info = vim.health.start, vim.health.ok, vim.health.warn, vim.health.error, vim.health.info
local fmt = string.format

return {
check = function()
start("word Configuration")
end
}
3 changes: 0 additions & 3 deletions lua/word.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
---@class word.word
local W = {
cfg = require("word.config").config,
health = require("word.health"),
mod = require("word.mod"),
version = require("word.config").version,
config = require("word.config"),
callbacks = require("word.util.callback"),
log = require("word.util.log"),
Expand All @@ -41,7 +39,6 @@ local a, f, ext = vim.api, vim.fn, vim.tbl_deep_extend
--- @see config.user
--- @see word.configuration.user
function W.setup(conf)
assert(utils.is_minimum_version(0, 10, 0), "must have nvim 0.10.0+")
conf = conf or { mods = {} }
if conf.mods == nil then conf.mods = {} end
con.user = utils.extend(con.user, conf)
Expand Down
139 changes: 0 additions & 139 deletions lua/word/health.lua

This file was deleted.

43 changes: 21 additions & 22 deletions lua/word/mod/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,26 @@ M.config.public = {
local workspace ---@type workspace
local refactor ---@type lsp.refactor
local format ---@type lsp.format
local ts ---@type query
local ts ---@type treesitter
local cmp ---@type lsp.completion

M.load = function()
M.required.cmd.add_commands_from_table({
rename = {
args = 1,
name = "rename",
subcommands = {
file = {
min_args = 0,
max_args = 1,
name = "rename.file",
},
heading = {
args = 0,
name = "rename.heading",
},
},
},
lsp = {
min_args = 0,
max_args = 1,
Expand Down Expand Up @@ -150,21 +165,6 @@ M.load = function()
args = 1,
name = "lsp.refactor"
},
rename = {
args = 1,
name = "lsp.rename",
subcommands = {
file = {
min_args = 0,
max_args = 1,
name = "lsp.rename.file",
},
heading = {
args = 0,
name = "lsp.rename.heading",
},
},
},
},
},
})
Expand All @@ -181,7 +181,7 @@ M.load = function()
end

M.private.handlers = {
["initialize"] = function(_params, callback, _notify_reply_callback)
initialize = function(_params, callback, _notify_reply_callback)
local initializeResult = {
capabilities = {
renameProvider = {
Expand Down Expand Up @@ -605,12 +605,11 @@ M.events.subscribed = {
["lsp.command"] = true,
["lsp.hint"] = true,
["lsp.diagnostic"] = true,
["lsp.workspace"] = true,
["lsp.format"] = true,
["lsp.refactor"] = true,
["lsp.rename"] = true,
["lsp.rename.file"] = true,
["lsp.rename.heading"] = true,
["rename"] = true,
["rename.file"] = true,
["rename.heading"] = true,
},
}

Expand Down Expand Up @@ -687,7 +686,7 @@ M.private["lsp.action"] = function(event)
vim.lsp.util.open_floating_preview {
}
end
M.private["lsp.rename.heading"] = function(event)
M.private["rename.heading"] = function(event)
local line_number = event.cursor_position[1]
local prefix = string.match(event.line_content, "^%s*%*+ ")
if not prefix then -- this is a very very simple check that we're on a heading line. We use TS in the actual rename_heading function
Expand Down
3 changes: 3 additions & 0 deletions lua/word/util/log.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ end

local unpack = unpack or table.unpack

Log.debug = function(inp)
-- print("ERROR: ", inp)
end
Log.warn = function(inp)
-- print("ERROR: ", inp)
end
Expand Down
2 changes: 2 additions & 0 deletions plugin/word.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ if vim.g.word_loaded then
end
vim.g.word_loaded = 1
vim.g.word_version = [[0.1.0]]

assert(require("word.util").is_minimum_version(0, 10, 0), "must have nvim 0.10.0+")
require("word")
3 changes: 3 additions & 0 deletions scripts/docs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#r/usr/bin/env lua

--vim:ft=lua
8 changes: 8 additions & 0 deletions scripts/gen
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env codon run

import os
import sys

os.system("echo 'hi there")

# vim:ft=python
3 changes: 3 additions & 0 deletions scripts/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env lua

--vim:ft=lua
Loading

0 comments on commit d02c752

Please sign in to comment.