lsplines fix
This commit is contained in:
@ -80,12 +80,6 @@ return {
|
||||
require("libp").setup()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
config = function()
|
||||
require("which-key").setup({})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mhinz/vim-signify",
|
||||
event = "VimEnter",
|
||||
|
@ -98,16 +98,16 @@ return {
|
||||
|
||||
cmp.setup({
|
||||
mapping = {
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-u>"] = cmp.mapping.scroll_docs(4),
|
||||
["<S-Up>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<S-Down>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-e>"] = cmp.mapping.close(),
|
||||
["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
-- elseif has_words_before() then
|
||||
-- cmp.complete()
|
||||
else
|
||||
fallback() -- The fallback function sends a already mapped key. In this case, it's probably `<Tab>`.
|
||||
end
|
||||
@ -118,22 +118,6 @@ return {
|
||||
cmp.select_prev_item()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
|
||||
["<Up>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
else
|
||||
fallback() -- The fallback function sends a already mapped key. In this case, it's probably `<Tab>`.
|
||||
end
|
||||
end),
|
||||
|
||||
["<Down>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
else
|
||||
fallback() -- The fallback function sends a already mapped key. In this case, it's probably `<Tab>`.
|
||||
end
|
||||
end),
|
||||
},
|
||||
|
||||
preselect = cmp.PreselectMode.None,
|
||||
|
@ -1,21 +1,20 @@
|
||||
return {
|
||||
url = "https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
||||
event = "VimEnter",
|
||||
name = "lsp_lines.nvim",
|
||||
config = function()
|
||||
vim.diagnostic.config({
|
||||
-- virtual_lines = { only_current_line = true },
|
||||
virtual_lines = true,
|
||||
update_on_insert = false,
|
||||
virtual_text = false,
|
||||
})
|
||||
|
||||
require("lsp_lines").setup()
|
||||
|
||||
vim.diagnostic.config({ virtual_text = false })
|
||||
vim.diagnostic.config({ virtual_lines = { highlight_whole_line = false, only_current_line = false } })
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<leader>l",
|
||||
function()
|
||||
require("lsp_lines").toggle()
|
||||
local new_value = not vim.diagnostic.config().virtual_lines.only_current_line
|
||||
vim.diagnostic.config({ virtual_lines = { only_current_line = new_value } })
|
||||
return new_value
|
||||
end,
|
||||
desc = "Toggle LSP Lines",
|
||||
},
|
||||
|
@ -31,15 +31,15 @@ local function get_visual_selection()
|
||||
end
|
||||
|
||||
local keys = {
|
||||
{ "<leader>ts", [[<cmd>lua require("neoscopes").select()<CR>]], desc = "NeoScopes" },
|
||||
{ "<leader>ts", "<cmd>lua search_cwd()<CR>", desc = "[T]elescope [S]earch Directory" },
|
||||
{ "<leader>tl", "<cmd>lua live_grep()<CR>", desc = "[T]elescope [L]ive Grep" },
|
||||
|
||||
{ "<leader>ff", ":Telescope current_buffer_fuzzy_find<CR>", desc = "[T]elescope [F]uzzy [F]ind" },
|
||||
{ "<leader>tg", ":Telescope git_files<CR>", desc = "[T]elescope [G]it Files" },
|
||||
{ "<leader>tr", ":Telescope resume<CR>", desc = "[T]elescope [R]esume" },
|
||||
{ "<leader>t*", "<cmd>lua require('telescope.builtin').grep_string{}<CR>", desc = "[T]elescope current [W]ord" },
|
||||
{ "<leader>ts", "<cmd>lua live_grep()<CR>", desc = "Search in CWD" },
|
||||
{ "<C-P>", "<cmd>lua find_files()<CR>", desc = "Find Files in CWD" },
|
||||
{ "<leader>tf", "<cmd>lua find_files()<CR>", desc = "Find Files in CWD" },
|
||||
{ "<leader>tf.", "<cmd>lua search_cwd()<CR>", desc = "Find Files in Buffer Directory" },
|
||||
{ "<leader>tg", ":Telescope git_files<CR>", desc = "Git Files" },
|
||||
{ "<leader>tl", ":Telescope resume<CR>", desc = "Last Query" },
|
||||
{ "<leader>tr", ":Telescope oldfiles<CR>", desc = "Recent Files" },
|
||||
{ "<leader>th", "<cmd>lua require('telescope.builtin').help_tags{}<CR>", desc = "[T]elescope [H]elp" },
|
||||
{ "<leader>tns", [[<cmd>lua require("neoscopes").select()<CR>]], desc = "NeoScopes" },
|
||||
}
|
||||
|
||||
if use_google() then
|
||||
|
36
vim/.vim/lua/plugins/whichkey.lua
Normal file
36
vim/.vim/lua/plugins/whichkey.lua
Normal file
@ -0,0 +1,36 @@
|
||||
return {
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
init = function()
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 300
|
||||
end,
|
||||
config = function()
|
||||
require("which-key").setup({})
|
||||
-- local wk = require("which-key")
|
||||
--
|
||||
-- wk.register({ [";"] = { ":" } }, { mode = "v" })
|
||||
-- wk.register({ [";"] = { ":" } }, { mode = "n" })
|
||||
--
|
||||
-- wk.register({
|
||||
-- ["%%"] = { '<C-R>=fnameescape(expand("%:p:h")."/")<CR>', "Current File Directory" },
|
||||
-- }, { mode = "c" })
|
||||
--
|
||||
-- wk.register({
|
||||
-- ["jk"] = { "<esc>" },
|
||||
-- ["J"] = { ":tabprevious<CR>" },
|
||||
-- ["K"] = { ":tabnext<CR>" },
|
||||
-- ["vv"] = { "<C-W>v" },
|
||||
-- ["ss"] = { "<C-W>s" },
|
||||
-- ["<space><space>"] = { ":w<CR>" },
|
||||
-- })
|
||||
--
|
||||
-- wk.register({
|
||||
-- t = {
|
||||
-- name = "+tab",
|
||||
-- t = { ":tabedit<Space>" },
|
||||
-- d = { ":tabclose<CR>" },
|
||||
-- },
|
||||
-- })
|
||||
end,
|
||||
}
|
@ -30,11 +30,6 @@ nnoremap K :tabnext<CR>
|
||||
nnoremap tt :tabedit<Space>
|
||||
nnoremap td :tabclose<CR>
|
||||
|
||||
" Shift-U and D for document navigation(page up, page down)
|
||||
nnoremap <S-U> <C-U>
|
||||
map <S-D> <nop>
|
||||
nnoremap <S-D> <C-D>
|
||||
|
||||
" Line swapping. I don't really use this that often
|
||||
nnoremap [e :<c-u>execute 'move -1-'. v:count1<cr>
|
||||
nnoremap ]e :<c-u>execute 'move +'. v:count1<cr>
|
||||
|
@ -1,16 +0,0 @@
|
||||
" disable/enable the cursor line on window enter/exit
|
||||
au WinEnter * setlocal cursorline
|
||||
au WinLeave * setlocal nocursorline
|
||||
|
||||
highlight ExtraWhitespace ctermbg=red
|
||||
|
||||
" enable extra syntax hilighting for C++
|
||||
let g:cpp_class_scope_highlight = 1
|
||||
let g:cpp_experimental_template_highlight = 1
|
||||
|
||||
" Function to let me know what syntax hilighting group is under the cursor.
|
||||
" Not used often
|
||||
function! SynGroup()
|
||||
let l:s = synID(line('.'), col('.'), 1)
|
||||
echo synIDattr(l:s, 'name') . ' -> ' . synIDattr(synIDtrans(l:s), 'name')
|
||||
endfun
|
Reference in New Issue
Block a user