-
-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
I am not 100% sure about this, it doesn't seem to be causing a problem, but I think it would be wise to clean this up. It stops if I disable nvim-ide, nothing else, and that is my only suspicion that is is this plugin, I don't have much else to go off of.
Junk in messages:
{
cb = <function 1>,
key = "<CR>"
}
{
cb = <function 1>,
key = "s"
}
{
cb = <function 1>,
key = "v"
}
{
cb = <function 1>,
key = "d"
}
{
cb = <function 1>,
key = "H"
}
{
cb = <function 1>,
key = "?"
}
init.lua:
-- General Settings
vim.g.mapleader = " "
vim.env.BASH_ENV = "`/.config/zsh/.aliases"
vim.opt.mouse = "a"
vim.opt.hlsearch = false
vim.cmd([[filetype plugin on]])
vim.opt.encoding = "utf-8"
vim.opt.number = true
vim.opt.relativenumber = true
vim.o.statuscolumn = "%s%{%v:lnum == line('.') ? '%#CursorLineNr#' .. v:lnum : v:lnum%}%=" .. " %-3r"
vim.opt.splitbelow = true
vim.opt.splitright = true
vim.opt.clipboard:append("unnamedplus")
vim.cmd("highlight CursorLine guibg=#333333")
vim.opt.cursorline = true
vim.opt.guicursor = "n-v-c:block,i:hor25-blinkon100-blinkoff75"
-- Plugins
local vim = vim
local Plug = vim.fn['plug#']
vim.call('plug#begin')
Plug('ldelossa/nvim-ide')
Plug('dense-analysis/ale')
Plug('nvim-lualine/lualine.nvim')
Plug('nvim-treesitter/nvim-treesitter', {['do'] = ':TSUpdate'})
Plug('Vigemus/iron.nvim')
Plug('ibhagwan/fzf-lua', {['branch'] = 'main'})
Plug('neoclide/coc.nvim', {['branch'] = 'master', ['do'] = 'npm ci'})
--Plug('kevinhwang91/promise-async')
Plug('lukas-reineke/indent-blankline.nvim')
Plug('HiPhish/rainbow-delimiters.nvim')
vim.call('plug#end')
-- Autocompletion
vim.opt.wildmode = { "longest", "list", "full" }
-- Disable autocommenting
vim.api.nvim_create_autocmd("FileType", {
pattern = "*",
command = "setlocal formatoptions-=c formatoptions-=o formatoptions-=r",
})
-- Check file with shellcheck
vim.keymap.set("n", "<leader>s", ":!clear && shellcheck %<CR>", { noremap = true, silent = true })
-- Remove and highlight trailing whitespace
vim.api.nvim_create_autocmd("BufWritePost", {
pattern = "*",
command = [[%s/\s\+$//e]],
})
vim.cmd([[highlight ExtraWhitespace ctermbg=red guibg=red]])
vim.fn.matchadd("ExtraWhitespace", [[\s\+$]])
vim.api.nvim_create_autocmd("InsertEnter", {
pattern = "*",
command = [[match ExtraWhitespace /\s\+\%#\@<!$/]],
})
vim.api.nvim_create_autocmd("InsertLeave", {
pattern = "*",
command = [[match ExtraWhitespace /\s\+$/]],
})
vim.api.nvim_create_autocmd("BufWinLeave", {
pattern = "*",
command = "call clearmatches()",
})
-- Key mappings
vim.keymap.set("v", "<C-c>", '"+y', { noremap = true })
vim.keymap.set("n", "<C-p>", '"+P', { noremap = true })
vim.keymap.set("i", "jj", "<Esc>", { noremap = true })
vim.keymap.set("n", ";", ":", { noremap = true })
vim.keymap.set("n", "qq", ":qa<CR>", { noremap = true })
vim.keymap.set("n", "ww", ":w<CR>", { noremap = true })
vim.keymap.set("n", "wq", ":wqa<CR>", { noremap = true })
vim.keymap.set("n", "q1", ":qa!<CR>", { noremap = true })
vim.keymap.set("n", "<leader>sv", ":source ~/.config/nvim/init.lua<CR>", { noremap = true })
vim.keymap.set("n", "W1", ":Workspace LeftPanelToggle<CR>", { noremap = true, silent = true })
vim.keymap.set("n", "TT", ":Workspace TerminalBrowser New<CR>", { noremap = true, silent = true })
vim.keymap.set("n", "QQ", ":q<CR>", { noremap = true, silent = true })
vim.keymap.set("n", "<c-P>", require('fzf-lua').files, { desc = "Fzf Files" })
vim.keymap.set("n", "wa", ":wa<CR>", { noremap = true})
-- Indentation settings
vim.opt.softtabstop = 2
vim.opt.shiftwidth = 2
vim.opt.smarttab = true
vim.opt.expandtab = true
-- nvim-ide
local bufferlist = require('ide.components.bufferlist')
local explorer = require('ide.components.explorer')
local outline = require('ide.components.outline')
local callhierarchy = require('ide.components.callhierarchy')
local timeline = require('ide.components.timeline')
local terminal = require('ide.components.terminal')
local terminalbrowser = require('ide.components.terminal.terminalbrowser')
local changes = require('ide.components.changes')
local commits = require('ide.components.commits')
local branches = require('ide.components.branches')
local bookmarks = require('ide.components.bookmarks')
require('ide').setup({
icon_set = "default",
log_level = "info",
components = {
global_keymaps = {
},
},
panels = {
left = "explorer",
right = "git"
},
panel_groups = {
explorer = { outline.Name, bufferlist.Name, explorer.Name, bookmarks.Name, callhierarchy.Name, terminalbrowser.Name },
terminal = { terminal.Name },
git = { changes.Name, commits.Name, timeline.Name, branches.Name }
},
workspaces = {
auto_open = 'left',
},
panel_sizes = {
left = 28,
right = 30,
bottom = 12
}
})
-- Lualine
require('lualine').setup {
options = {
icons_enabled = true,
theme = 'powerline',
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
globalstatus = false,
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
}
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'diagnostics'},
lualine_c = {'filename'},
lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_y = {'progress'},
lualine_z = {'location'}
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {'filename'},
lualine_x = {'location'},
lualine_y = {},
lualine_z = {}
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {}
}
-- Treesitter
require'nvim-treesitter.configs'.setup {
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "markdown", "markdown_inline" },
sync_install = false,
auto_install = true,
ignore_install = { "javascript" },
highlight = {
enable = true,
disable = { "c", "rust" },
disable = function(lang, buf)
local max_filesize = 100 * 1024 -- 100 KB
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
return true
end
end,
additional_vim_regex_highlighting = false,
},
}
-- coc-nvim
vim.keymap.set("i", "<TAB>", [[coc#pum#visible() ? coc#pum#confirm() : "\<C-t>"]], {silent = true, noremap = true, expr = true, replace_keycodes = false})
vim.cmd("hi CocMenuSel ctermbg=237 guibg=#13354A")
-- rainbow-delimiters
local rainbow_delimiters = require 'rainbow-delimiters'
vim.g.rainbow_delimiters = {
strategy = {
[''] = rainbow_delimiters.strategy['global'],
vim = rainbow_delimiters.strategy['local'],
},
query = {
[''] = 'rainbow-delimiters',
lua = 'rainbow-blocks',
},
priority = {
[''] = 110,
lua = 210,
},
highlight = {
'RainbowDelimiterRed',
'RainbowDelimiterYellow',
'RainbowDelimiterBlue',
'RainbowDelimiterOrange',
'RainbowDelimiterGreen',
'RainbowDelimiterViolet',
'RainbowDelimiterCyan',
},
}
-- indent-blankline
local highlight = {
"RainbowRed",
"RainbowYellow",
"RainbowBlue",
"RainbowOrange",
"RainbowGreen",
"RainbowViolet",
"RainbowCyan",
}
local hooks = require "ibl.hooks"
hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" })
vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" })
vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" })
vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" })
vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" })
vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" })
vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" })
end)
vim.g.rainbow_delimiters = { highlight = highlight }
require("ibl").setup { indent = { highlight = highlight } }
hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark)
-- highlight > col 80 function
vim.cmd([[highlight OverLength ctermbg=238 guibg=#303030]])
local column_highlight_enabled = true --default on
vim.cmd([[match OverLength /\%>80v./]])
local function ToggleColumnHighlight()
if not column_highlight_enabled then
-- Turn ON
vim.cmd([[match OverLength /\%>79v./]])
column_highlight_enabled = true
print("Column highlight ON")
else
-- Turn OFF
vim.cmd([[match none]])
column_highlight_enabled = false
print("Column highlight OFF")
end
end
vim.api.nvim_create_user_command("ToggleColumnHighlight", ToggleColumnHighlight, {})
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels