Files
my-nvim/lua/crentist/null-ls.lua
2024-12-18 11:36:49 +02:00

43 lines
1.2 KiB
Lua

-- https://www.youtube.com/watch?v=q-oBU2fO1H4&t=189s
local null_ls = require("null-ls")
-- local function check_if_comment(node, params)
-- if node == 'nil' then return false
-- if node:type() ~= 'comment' or node:type() ~= 'comment_content' then return false end
--
-- if node:type() == 'comment' then
-- local child = node:child()
--
-- if child == 'nil' then return false end
-- end
--
-- -- node exists and is a part of comment
-- if node == 'nil' or node:type() ~= 'comment' or node:type() ~= 'comment_content' then return false end
--
-- local parent = node:parent()
-- if parent == 'nil' or parent:type() ~= 'comment' then return false end
--
-- local text = vim.treesitter.get_node_text(node, )
-- end
-- null_ls.register({
-- name = 'Comment actions',
-- method = null_ls.methods.CODE_ACTION,
-- filetypes = {},
-- generator = {
-- fn = function(params)
-- local out = {}
--
-- table.insert(out,
-- {
-- title = 'Test',
-- action = function()
-- print(vim.treesitter.get_node())
-- end
-- })
-- return out
-- end
-- }
-- })