Skip to content
This repository has been archived by the owner on Nov 26, 2023. It is now read-only.

Problems with Insert mode: #3

Open
chriztheanvill opened this issue Apr 19, 2022 · 0 comments
Open

Problems with Insert mode: #3

chriztheanvill opened this issue Apr 19, 2022 · 0 comments

Comments

@chriztheanvill
Copy link

This part of code makes neovim checkhealth complains and

if vim.g.surround_map_insert_mode then
		-- Insert Mode Ctrl-S mappings
		for key, pair in pairs(vim.g.surround_pairs_flat) do
			local left = string.rep("<left>", #pair[CLOSING])

			map("i", "<c-s>" .. key, pair[OPENING] .. pair[CLOSING] .. left)
			map("i", "<c-s>" .. key .. " ", pair[OPENING] .. "  " .. pair[CLOSING] .. left .. "<left>")
			map("i", "<c-s>" .. key .. "<c-s>", pair[OPENING] .. "<cr>" .. pair[CLOSING] .. "<esc>O")

			for side = 1, 2 do
				if #pair[side] == 1 then
					map("i", "<c-s>" .. pair[side], pair[OPENING] .. pair[CLOSING] .. left)
					map("i", "<c-s>" .. pair[side] .. " ", pair[OPENING] .. "  " .. pair[CLOSING] .. left .. "<left>")
					map("i", "<c-s>" .. pair[side] .. "<c-s>", pair[OPENING] .. "<cr>" .. pair[CLOSING] .. "<esc>O")
				end
			end
		end
	end

My checkhealth:


mkdp: health#mkdp#check
========================================================================
  - INFO: Platform: linux
  - INFO: Nvim Version: NVIM v0.7.0
  - INFO: Node version: v16.14.0

  - INFO: Script: /home/cris/.local/share/nvim/site/pack/packer/start/markdown-preview.nvim/app/server.js
  - INFO: Script exists: 1
  - OK: Using node

nvim: health#nvim#check
========================================================================
## Configuration
  - OK: no issues found

## Performance
  - OK: Build type: RelWithDebInfo

## Remote Plugins
  - OK: Up to date

## terminal
  - INFO: key_backspace (kbs) terminfo entry: key_backspace=\177
  - INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~
  - INFO: $VTE_VERSION='6602'
  - INFO: $COLORTERM='truecolor'

nvim-treesitter: require("nvim-treesitter.health").check()
========================================================================
## Installation
  - OK: `tree-sitter` found 0.20.6 (465ceead0faf3a0aab311806795664a2c2fad5de) (parser generator, only needed for :TSInstallFromGrammar)
  - OK: `node` found v16.14.0 (only needed for :TSInstallFromGrammar)
  - OK: `git` executable found.
  - OK: `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
    Version: cc (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9)
  - OK: Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

## Parser/Features H L F I J
  - vim            ✓ ✓ . . ✓ 
  - toml           ✓ ✓ ✓ ✓ ✓ 
  - glsl           ✓ ✓ ✓ ✓ ✓ 
  - query          ✓ ✓ ✓ ✓ ✓ 
  - llvm           ✓ . . . . 
  - ninja          ✓ . ✓ ✓ . 
  - cmake          ✓ . ✓ . . 
  - cpp            ✓ ✓ ✓ ✓ ✓ 
  - bash           ✓ ✓ ✓ . ✓ 
  - c              ✓ ✓ ✓ ✓ ✓ 
  - lua            ✓ ✓ ✓ ✓ ✓ 
  - rust           ✓ ✓ ✓ ✓ ✓ 

  Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
         +) multiple parsers found, only one will be used
         x) errors found in the query, try to run :TSUpdate {lang}

provider: health#provider#check
========================================================================
## Clipboard (optional)
  - OK: Clipboard tool found: xclip

## Python 3 provider (optional)
  - INFO: `g:python3_host_prog` is not set.  Searching for python3 in the environment.
  - INFO: Multiple python3 executables found.  Set `g:python3_host_prog` to avoid surprises.
  - INFO: Executable: /usr/bin/python3
  - INFO: Other python executable: /bin/python3
  - INFO: Python version: 3.10.4
  - INFO: pynvim version: 0.4.3
  - OK: Latest pynvim is installed.

## Python virtualenv
  - OK: no $VIRTUAL_ENV

## Ruby provider (optional)
  - WARNING: `ruby` and `gem` must be in $PATH.
    - ADVICE:
      - Install Ruby and verify that `ruby` and `gem` commands work.

## Node.js provider (optional)
  - INFO: Node.js: v16.14.0
  - WARNING: Missing "neovim" npm (or yarn) package.
    - ADVICE:
      - Run in shell: npm install -g neovim
      - Run in shell (if you use yarn): yarn global add neovim
      - You may disable this provider (and warning) by adding `let g:loaded_node_provider = 0` to your init.vim

## Perl provider (optional)
  - WARNING: "Neovim::Ext" cpan module is not installed
    - ADVICE:
      - See :help |provider-perl| for more information.
      - You may disable this provider (and warning) by adding `let g:loaded_perl_provider = 0` to your init.vim

telescope: require("telescope.health").check()
========================================================================
## Checking for required plugins
  - OK: plenary installed.
  - OK: nvim-treesitter installed.

## Checking external dependencies
  - OK: rg: found ripgrep 13.0.0
  - OK: fd: found fd 8.2.1

## ===== Installed extensions =====

## Telescope Extension: `bookmarks`
  - INFO: No healthcheck provided

## Telescope Extension: `fzy_native`
  - INFO: No healthcheck provided

## Telescope Extension: `media_files`
  - INFO: No healthcheck provided

## Telescope Extension: `project`
  - INFO: No healthcheck provided

## Telescope Extension: `session-lens`
  - INFO: No healthcheck provided

vim.lsp: require("vim.lsp.health").check()
========================================================================
  - INFO: LSP log level : WARN
  - INFO: Log path: /home/cris/.cache/nvim/lsp.log
  - INFO: Log size: 18023 KB

vim.treesitter: require("vim.treesitter.health").check()
========================================================================
  - INFO: Runtime ABI version : 14
  - OK: Loaded parser for bash: ABI version 13
  - OK: Loaded parser for c: ABI version 13
  - OK: Loaded parser for cmake: ABI version 13
  - OK: Loaded parser for cpp: ABI version 13
  - OK: Loaded parser for glsl: ABI version 13
  - OK: Loaded parser for llvm: ABI version 13
  - OK: Loaded parser for lua: ABI version 13
  - OK: Loaded parser for ninja: ABI version 13
  - OK: Loaded parser for query: ABI version 13
  - OK: Loaded parser for rust: ABI version 13
  - OK: Loaded parser for toml: ABI version 13
  - OK: Loaded parser for vim: ABI version 13
  - OK: Loaded parser for c: ABI version 13

which_key: health#which_key#check
========================================================================
## WhichKey: checking conflicting keymaps
  - WARNING: conflicting keymap exists for mode **"n"**, lhs: **"\\mt"**
  - INFO: rhs: `:Toc<CR>`
  - WARNING: conflicting keymap exists for mode **"n"**, lhs: **"t"**
  - INFO: rhs: ` `
  - WARNING: conflicting keymap exists for mode **"i"**, lhs: **"<C-S>)"**
  - INFO: rhs: `()<Left>`
  - WARNING: conflicting keymap exists for mode **"i"**, lhs: **"<C-S>q"**
  - INFO: rhs: `''<Left>`
  - WARNING: conflicting keymap exists for mode **"i"**, lhs: **"<C-S>`"**
  - INFO: rhs: ```<Left>`
  - WARNING: conflicting keymap exists for mode **"i"**, lhs: **"<C-S>{"**
  - INFO: rhs: `{}<Left>`
  - WARNING: conflicting keymap exists for mode **"i"**, lhs: **"<C-S>d"**
  - INFO: rhs: `""<Left>`
  - WARNING: conflicting keymap exists for mode **"i"**, lhs: **"<C-S>}"**
  - INFO: rhs: `{}<Left>`
  - WARNING: conflicting keymap exists for mode **"i"**, lhs: **"<C-S>s"**
  - INFO: rhs: `[]<Left>`
  - WARNING: conflicting keymap exists for mode **"i"**, lhs: **"<C-S>>"**
  - INFO: rhs: `<lt>><Left>`
  - WARNING: conflicting keymap exists for mode **"i"**, lhs: **"<C-S>("**
  - INFO: rhs: `()<Left>`
  - WARNING: conflicting keymap exists for mode **"i"**, lhs: **"<C-S>t"**
  - INFO: rhs: ```<Left>`
  - WARNING: conflicting keymap exists for mode **"i"**, lhs: **"<C-S>B"**
  - INFO: rhs: `{}<Left>`
  - WARNING: conflicting keymap exists for mode **"i"**, lhs: **"<C-S><lt>"**
  - INFO: rhs: `<lt>><Left>`
  - WARNING: conflicting keymap exists for mode **"i"**, lhs: **"<C-S>b"**
  - INFO: rhs: `()<Left>`
  - WARNING: conflicting keymap exists for mode **"i"**, lhs: **"<C-S>'"**
  - INFO: rhs: `''<Left>`
  - WARNING: conflicting keymap exists for mode **"i"**, lhs: **"<C-S>\""**
  - INFO: rhs: `""<Left>`
  - WARNING: conflicting keymap exists for mode **"i"**, lhs: **"<C-S>a"**
  - INFO: rhs: `<lt>><Left>`
  - WARNING: conflicting keymap exists for mode **"i"**, lhs: **"<C-S>]"**
  - INFO: rhs: `[]<Left>`
  - WARNING: conflicting keymap exists for mode **"i"**, lhs: **"<C-S>["**
  - INFO: rhs: `[]<Left>`

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant