Neovim : Redirect errors to /tmp logfile.

This commit is contained in:
Dmitry Voronin 2024-10-15 03:40:04 +03:00
parent 493ef5ae02
commit 14f818974a
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
4 changed files with 25 additions and 3 deletions

View file

@ -66,10 +66,12 @@ in
./module/plugin/Treesitter.nix
./module/plugin/Fold.nix
./module/plugin/Colorizer.nix
./module/plugin/lsp/Go.nix
./module/plugin/lsp/Haskell.nix
./module/plugin/lsp/Lua.nix
./module/plugin/lsp/Nix.nix
./module/plugin/lsp/Rust.nix
./module/plugin/lsp/Tex.nix
./module/plugin/lsp/Nix.nix
./module/key/Autocomplete.nix
./module/key/Buffer.nix
./module/key/Cmd.nix

View file

@ -1,9 +1,13 @@
{ ... }:
{
text = ''
-- Disable error messages.
-- Disable error messages popup.
-- Instead write them to /tmp/NeovimError<PID>.txt
vim.notify = function(msg, log_level, opts)
return
local pid = vim.fn.getpid()
local file = io.open("/tmp/NeovimError"..tostring(pid)..".txt", "a")
file:write(msg.."\n")
file:close()
end
'';
}

View file

@ -0,0 +1,8 @@
{ ... }:
{
text = ''
local lspconfig = require("lspconfig")
lspconfig.gopls.setup {}
'';
}

View file

@ -0,0 +1,8 @@
{ ... }:
{
text = ''
local lspconfig = require("lspconfig")
lspconfig.lua_ls.setup {}
'';
}