Comments (7)
t_Cs
is not supported
from neovim.
Is there a way to work around that do the t_Cs
thing in neovim? Or what method should I try? change a terminal or something?
from neovim.
What terminal are you using? Bash is not a terminal and XTerm doesn't supoort undercurl.
from neovim.
I use kitty and it works fine (it shows undercurl as usual). But when I open nvim in a docker container, it has this problem.
from neovim.
Hmm, the value of $TERM
should be xterm-kitty
inside kitty, not xterm
.
from neovim.
I have the same issue with st 0.9 (with undercurl patch) and tmux next-3.5 built from git head like a week ago. I have TERM=screen-256color
inside of tmux (which I need to use for key compatibility with old terminfo databases shipped on servers I administer via ssh). Undercurl works fine outside of tmux (TERM=st-256color
) in neovim, but shows only an underline inside tmux.
I have the following overrides in tmux.conf just to ensure the feature is enabled.
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0
And outside of neovim undercurl is displayed correctly inside of tmux with, e.g., printf '\e[4:3mUndercurl\e[0m\n'
. But inside neovim running inside tmux I only get an underline.
I assume there is some kind of feature detection based on the value of TERM? Is there any way to override that to force the feature to be enabled?
from neovim.
For anyone who has a similar problem, I asked chatgpt and got a solution. Here is the answer from gpt
When you use
docker exec
to enter a Docker container, the$TERM
environment variable is set toxterm
by default because it is a widely recognized and compatible setting for most programs. This environment variable informs programs running on the terminal about the type and capabilities of the terminal so that they can adjust their behavior accordingly, such as how to interpret colors and handle cursor movements.
xterm-kitty
is specifically for the Kitty terminal emulator, and Kitty uses it to enable additional features that may not be available in other terminal environments. When you start a Docker container terminal from Kitty, you need to explicitly set the terminal type to retain some of the underlying features of Kitty.
To set the$TERM
variable in the container toxterm-kitty
, you can pass the environment variable when connecting to the container:
docker exec -it -e TERM=xterm-kitty [container-id] /bin/bash
Note that to fully utilize the features provided by
xterm-kitty
, your container needs to have the appropriate terminal information files (terminfo). If they are not present, some features specific toxterm-kitty
may not work as expected. If the base image of the container does not include the Kitty terminfo file, you may need to copy this file from the host machine to the corresponding location in the container, which is usually/usr/share/terminfo/x/xterm-kitty
.
For me, I just copy xterm-kitty in my kitty install path and it works.
docker cp ~/.local/kitty.app/share/terminfo/x/xterm-kitty container_id:/usr/share/terminfo/x/
from neovim.
Related Issues (20)
- Add a function for async rpcrequest HOT 3
- Inconsistent behavior around vim.api.nvim_tabpage_set_var and vim.api.nvim_tabpage_get_var HOT 2
- completeopt=popup crashing neovim HOT 1
- multibyte 'langmap' doesn't work for custom mapping HOT 3
- New regular expression atoms for WORD-boundaries HOT 1
- Explain that the root node is not displayed in InspectTree HOT 1
- Downloading 'nvim-linux64.tar.gz' by following wiki results corrupt file HOT 2
- Sidebar obscures content on online help docs (neovim.io website) HOT 1
- fswatch: Event queue overflow with pyright lsp in git repo HOT 8
- ext_cmdline/message for the TUI: tracking issue HOT 1
- `expand('%')` returns absolute path in file having LSP diagnostics HOT 5
- `<C-Space>` as mapleader doesn't work and gives unexpected behavior HOT 3
- `treesitter/highlighter: Invalid '_subpriority': out of range` HOT 2
- ui_comp_raw_line: Assertion `attrs[i] >= 0' HOT 4
- [Windows] Nightly release triggers Windows Defender virus detection HOT 1
- Treesitter conceal broken HOT 4
- Segfault (msgpack) HOT 4
- Allow opening man pages in the current window HOT 3
- Installation failed on Fedora 39 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neovim.