oleggulevskyy / better-ts-errors.nvim Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Error 15:11:37 msg_show.lua_error E5108: Error executing lua ...b/.local/share/nvim/lazy/nui.nvim/lua/nui/utils/init.lua:29: Invalid window id: 1000
stack traceback:
[C]: in function 'nvim_win_get_width'
...b/.local/share/nvim/lazy/nui.nvim/lua/nui/utils/init.lua:29: in function 'get_window_size'
....local/share/nvim/lazy/nui.nvim/lua/nui/layout/utils.lua:94: in function 'get_container_info'
....local/share/nvim/lazy/nui.nvim/lua/nui/layout/utils.lua:161: in function 'update_layout_config'
...b/.local/share/nvim/lazy/nui.nvim/lua/nui/popup/init.lua:388: in function 'update_layout'
...azy/better-ts-errors.nvim/lua/better-ts-errors/popup.lua:25: in function 'show'
...tter-ts-errors.nvim/lua/better-ts-errors/diagnostics.lua:138: in function 'show'
...lazy/better-ts-errors.nvim/lua/better-ts-errors/main.lua:31: in function 'toggle'
...lazy/better-ts-errors.nvim/lua/better-ts-errors/init.lua:11: in function 'toggle'
[string ":lua"]:1: in main chunk
<leader>dd
on an error in a svelte file
The UI to show the formatted error
NVIM v0.10.1
Build type: Release
LuaJIT 2.1.1720049189
What I see with this plugin:
Error
(TS2339)
Property 'send' does not exist on type
�]0;nvp@Hephaestus: source "$SCRIPTS/bash-support/command-defaults.sh"��]0;nvp@Hephaestus: source "$SCRIPTS/bash-support/config.sh"��]0;nvp@Hephaestus: source "$SCRIPTS/bash-support/aliases.sh"��]0;nvp@Hephaestus: source "$HOME/shell/bash/npm.sh"��]0;nvp@Hephaestus: source "$HOME/shell/bash/gg.sh"��]0;nvp@Hephaestus: source "$HOME/shell/bash/github-action-runner.sh"��]0;nvp@Hephaestus: source "$HOME/shell/bash/git.sh"��]0;nvp@Hephaestus: source "$SCRIPTS/bash-support/environment-augmentations.sh"�{
needsControls: boolean;
splitHorizontally: boolean;
isMinimized: boolean;
isMaximized: boolean;
}
.
what my language server reports:
Diagnostics:
1. glint: Property 'send' does not exist on type '{ needsControls: boolean; splitHorizontally: boolean; isMinimized: boolean; isMaximized: boolean; }'. [2339]
no clue, tbh
some formatted version of what the language server reports
For example, the plugin davidosomething/format-ts-errors.nvim
does something similar, but rather than triggering a new buffer/window with a shortcut, they instruct the user to overwrite the existing "textDocument/publishDiagnostics" LSP handler, in order to format the actual LSP error hover. I think having an option to use existing formatting code in this way would be great.
Atm prettifying JS objects, if they are bigger than few keys, takes quite some time.
Maybe hashing them and returning output on the consequitive calls would be better
Or use something else for prettifying, like prettierd
?
https://github.com/fsouza/prettierd
The popup window isn't wide enough to show the entire error:
A configuration option to make the window larger.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.