Skip to content

Commit

Permalink
refactor: noice.source.lsp => noice.lsp
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Oct 27, 2022
1 parent 5750c09 commit 814c059
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lua/noice/config/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ function M.setup(options)
end,
})

require("noice.source.lsp").setup()
require("noice.lsp").setup()
M._running = true
end

Expand Down
2 changes: 1 addition & 1 deletion lua/noice/health.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local require = require("noice.util.lazy")

local Util = require("noice.util")
local Config = require("noice.config")
local Lsp = require("noice.source.lsp")
local Lsp = require("noice.lsp")

local M = {}

Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions lua/noice/source/lsp/init.lua → lua/noice/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ local require = require("noice.util.lazy")

local Manager = require("noice.message.manager")
local Config = require("noice.config")
local Format = require("noice.source.lsp.format")
local Format = require("noice.lsp.format")
local Util = require("noice.util")
local Message = require("noice.message")
local Signature = require("noice.source.lsp.signature")
local Signature = require("noice.lsp.signature")

local M = {}

Expand Down Expand Up @@ -48,11 +48,11 @@ function M.setup()
end

if Config.options.lsp.signature.auto_open.enabled then
require("noice.source.lsp.signature").setup(group)
require("noice.lsp.signature").setup(group)
end

if Config.options.lsp.progress.enabled then
require("noice.source.lsp.progress").setup()
require("noice.lsp.progress").setup()
end

vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI", "InsertCharPre" }, {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
local require = require("noice.util.lazy")

local NoiceText = require("noice.text")
local Format = require("noice.source.lsp.format")
local Format = require("noice.lsp.format")
local Markdown = require("noice.text.markdown")
local Config = require("noice.config")
local Util = require("noice.util")
Expand Down Expand Up @@ -88,7 +88,7 @@ function M.check(buf, chars, encoding)
if vim.tbl_contains(chars, M.get_char(buf)) then
local params = vim.lsp.util.make_position_params(0, encoding)
vim.lsp.buf_request(buf, "textDocument/signatureHelp", params, function(err, result, ctx)
require("noice.source.lsp").signature(err, result, ctx, {
require("noice.lsp").signature(err, result, ctx, {
trigger = true,
stay = function()
return vim.tbl_contains(chars, M.get_char(buf))
Expand Down
3 changes: 0 additions & 3 deletions lua/noice/text/markdown.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ function M.format(message, text)
local lines = vim.split(vim.trim(text), "\n")
lines = M.trim(lines)

text = table.concat(lines, "\n")
vim.notify(text)

for l, line in ipairs(lines) do
local prev = lines[l - 1]
local next = lines[l + 1]
Expand Down

0 comments on commit 814c059

Please sign in to comment.