Compare commits

...

3 Commits

Author SHA1 Message Date
9375a97be9
refactor(log): Change log level to warn
Since nothing is currently breaking majorly I am changing the log level
to warn.
2023-04-17 18:39:52 +01:00
1b8db9afc2
fix(log): remove LSP warnings from log.lua
Minor changes to log.lua to remove potential issues made apparent by the
LSP.
2023-04-17 18:38:11 +01:00
5a8b28066c
fix(LSP)!: Repair LSP config to handle plugin changes
Update the LSP config to avoid using setup_handlers for some mason
plugins since the functions have been deprecated.
2023-04-17 15:58:29 +01:00
2 changed files with 5 additions and 16 deletions

View File

@ -26,8 +26,7 @@ modules["mason-lspconfig"].setup_handlers {
["omnisharp"] = function ()
modules["lspconfig"]["omnisharp"].setup {
capabilities = capabilities,
on_attach = function (client,buffnr)
vim.notify("attaching to CS buffer {" .. buffnr .. "}")
on_attach = function (_,_)
local gr = vim.api.nvim_create_augroup("CS-OnAttach",{})
vim.api.nvim_create_autocmd({"BufWritePre"}, {
group = gr,
@ -38,7 +37,6 @@ modules["mason-lspconfig"].setup_handlers {
end
}
)
vim.notify("Attached to CS buffer")
end
}
end
@ -50,12 +48,6 @@ modules['mason-null-ls'].setup({
automatic_setup = true,
})
modules['mason-null-ls'].setup_handlers {
function (source_name, methods)
require('mason-null-ls.automatic_setup')(source_name,methods)
end,
-- Custom handlers can be added below if needed
}
modules['fidget'].setup{
text = {
@ -93,11 +85,6 @@ modules['mason-nvim-dap'].setup({
automatic_setup = true,
})
modules['mason-nvim-dap'].setup_handlers {
function (source_name)
require('mason-nvim-dap.automatic_setup')(source_name)
end
}
modules['dapui'].setup({
icons = {

View File

@ -2,6 +2,7 @@
--
-- Inspired by rxi/log.lua
-- Modified by tjdevries and can be found at github.com/tjdevries/vlog.nvim
-- Further modified by sherlock5512 as part of these dotfiles
--
-- This library is free software; you can redistribute it and/or modify it
-- under the terms of the MIT license. See LICENSE for details.
@ -21,7 +22,7 @@ local default_config = {
use_file = true,
-- Any messages above this level will be logged.
level = "trace",
level = "warn",
-- Level configuration
modes = {
@ -109,6 +110,7 @@ log.new = function(config, standalone)
vim.cmd(string.format("echohl %s", level_config.hl))
end
---@diagnostic disable-next-line: missing-parameter -- This function can be called with only two parameters
local split_console = vim.split(console_string, "\n")
for _, v in ipairs(split_console) do
vim.cmd(string.format([[echom "[%s] %s"]], config.plugin, vim.fn.escape(v, '"')))
@ -121,7 +123,7 @@ log.new = function(config, standalone)
-- Output to log file
if config.use_file then
local fp = io.open(outfile, "a")
local fp = assert(io.open(outfile, "a"),"Could not open " .. outfile .. "!")
local str = string.format("[%-6s%s] %s: %s\n",
nameupper, os.date(), lineinfo, msg)
fp:write(str)