fix: cursor shapes in nested tmux

This commit is contained in:
max_richter 2022-06-23 00:20:19 +02:00
parent 8fa67afb79
commit 359e4e717f
3 changed files with 21 additions and 1 deletions

View File

@ -6,6 +6,9 @@ set-option -sg escape-time 10
set -g destroy-unattached set -g destroy-unattached
# should fix cursor shapes in ssh
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
# remap prefix from 'C-b' to 'C-a' # remap prefix from 'C-b' to 'C-a'
unbind C-b unbind C-b
set-option -g prefix C-a set-option -g prefix C-a

View File

@ -11,11 +11,29 @@ table.insert(runtime_path, "lua/?/init.lua")
local function on_attach(client, bufnr) local function on_attach(client, bufnr)
local cap = client.server_capabilities local cap = client.server_capabilities
vim.notify(client.name)
if (cap.documentFormattingProvider) then if (cap.documentFormattingProvider) then
vim.api.nvim_create_autocmd("BufWritePre", { vim.api.nvim_create_autocmd("BufWritePre", {
buffer = bufnr, buffer = bufnr,
callback = function() callback = function()
vim.lsp.buf.format(); vim.lsp.buf.format();
if client.name == 'tsserver' or client.name == "svelte" then
-- params for the request
local params = {
command = "_typescript.organizeImports",
arguments = { vim.api.nvim_buf_get_name(bufnr) },
title = ""
}
-- perform a syncronous request
-- 500ms timeout depending on the size of file a bigger timeout may be needed
vim.lsp.buf_request_sync(bufnr, "workspace/executeCommand", params, 500)
end
end end
}) })
else else

View File

@ -25,7 +25,6 @@ vim.cmd [[set nocompatible]] -- Disable compatibility to old-time vi
set.mouse = 'a' -- Enable mouse support set.mouse = 'a' -- Enable mouse support
set.foldmethod = "expr" set.foldmethod = "expr"
set.foldexpr = "nvim_treesitter#foldexpr()" -- use treesitter for folding set.foldexpr = "nvim_treesitter#foldexpr()" -- use treesitter for folding
vim.wo.foldcolumn = '1'
vim.wo.foldlevel = 99 -- feel free to decrease the value vim.wo.foldlevel = 99 -- feel free to decrease the value
vim.wo.foldenable = true vim.wo.foldenable = true