This commit is contained in:
Christian Nieves
2023-09-13 16:31:09 +00:00
parent 59b507b658
commit 31f07ddc5e
14 changed files with 77 additions and 46 deletions

View File

@ -112,7 +112,7 @@ function! G4Blame(...)
" Get the output, split it on newline and keep empty lines, skip the first 2
" lines because they're headers we don't need, and put it in starting on line
" 1 of the left pane
call setline(1, split(system('g4 blame ' . file), '\n', 1)[2:])
call setline(1, split(system('hg blame ' . file), '\n', 1)[2:])
" Lock scrolling in left pane, turn off word wrap, set the buffer as
" not-modified, remove any listchars highlighting (common in google code), set
" it readonly (to make modifications slightly more annoying).

View File

@ -6,6 +6,8 @@ return {
"nvim-tree/nvim-web-devicons",
lazy = false,
},
"ldelossa/litee.nvim",
"ldelossa/litee-calltree.nvim",
"jghauser/mkdir.nvim",
"will133/vim-dirdiff",
"renerocksai/calendar-vim",

View File

@ -1,8 +1,8 @@
local use_google = require("utils").use_google
local TableConcat = require("utils").TableConcat
local keys = {
{ "<leader>f", ":FloatermToggle<CR>" },
{ "<leader>f", "<C-\\><C-n>:FloatermToggle<CR>", mode = "t" },
-- { "<leader>f", ":FloatermToggle<CR>" },
-- { "<leader>f", "<C-\\><C-n>:FloatermToggle<CR>", mode = "t" },
}
if use_google() then

View File

@ -132,7 +132,12 @@ return {
name = "google_comments",
-- url = "sso://googler@user/chmnchiang/google-comments",
dir = "/google/src/cloud/cnieves/google-comments/google3/experimental/users/chmnchiang/neovim/google-comments/",
dependencies = { "rktjmp/time-ago.vim", "rcarriga/nvim-notify", "nvim-lua/plenary.nvim" },
dependencies = {
"rktjmp/time-ago.vim",
"rcarriga/nvim-notify",
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
},
config = function()
-- vim.notify = require("notify")
-- Here are all the options and their default values:

View File

@ -7,12 +7,15 @@ return {
"nvim-lua/lsp-status.nvim",
"VonHeikemen/lsp-zero.nvim",
"rcarriga/nvim-notify",
"ldelossa/litee.nvim",
"ldelossa/litee-calltree.nvim",
},
keys = {
{ "<leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>" },
{ "<leader>ca", "<cmd>lua vim.lsp.buf.code_action()<CR>" },
{ "L", "<cmd>lua vim.lsp.buf.hover()<CR>" },
{ "g0", "<cmd>lua vim.lsp.buf.document_symbol()<CR>" },
{ "gr", "<Cmd>Telescope lsp_references<CR>" },
{ "gW", "<cmd>lua vim.lsp.buf.workspace_symbol()<CR>" },
{ "gd", "<cmd>lua vim.lsp.buf.definition()<CR>" },
{ "gD", "<cmd>tab split | lua vim.lsp.buf.definition()<CR>" },
@ -33,19 +36,11 @@ return {
local lsp_status = require("lsp-status")
lsp_status.register_progress()
require("litee.lib").setup({})
require("litee.calltree").setup({})
vim.opt.spell = true
vim.opt.spelllang = { "en_us" }
vim.lsp.handlers["window/showMessage"] = function(_, result, ctx)
local client = vim.lsp.get_client_by_id(ctx.client_id)
local lvl = ({ "ERROR", "WARN", "INFO", "DEBUG" })[result.type]
notify({ result.message }, lvl, {
title = "LSP | " .. client.name,
timeout = 1000,
keep = function()
return lvl == "ERROR" or lvl == "WARN"
end,
})
end
if use_google() then
configs.ciderlsp = {
@ -167,6 +162,18 @@ return {
require("lualine").refresh()
end
end
cider_lsp_handlers["window/showMessage"] = function(_, result, ctx)
local client = vim.lsp.get_client_by_id(ctx.client_id)
local lvl = ({ "ERROR", "WARN", "INFO", "DEBUG" })[result.type]
notify({ result.message }, lvl, {
title = "LSP | " .. client.name,
timeout = 1000,
keep = function()
return lvl == "ERROR" or lvl == "WARN"
end,
})
end
capabilities = require("cmp_nvim_ciderlsp").update_capabilities(capabilities)
capabilities.workspace.codeLens = { refreshSupport = true }
capabilities.workspace.diagnostics = { refreshSupport = true }

View File

@ -4,6 +4,11 @@ return {
config = function()
require("neo-tree").setup({
hijack_netrw_behavior = "open_current",
window = {
mappings = {
["O"] = "expand_all_nodes",
},
},
})
end,
dependencies = {

View File

@ -10,5 +10,6 @@ return {
stages = "slide", -- default fade_in_slide_out
timeout = 5000, -- default 5000
})
vim.notify = require("notify")
end,
}

View File

@ -1,5 +1,6 @@
local use_google = require("utils").use_google
local TableConcat = require("utils").TableConcat
local scopes = require("neoscopes")
-- Helper functions to fetch the current scope and set `search_dirs`
_G.find_files = function()
@ -15,9 +16,10 @@ end
local keys = {
{ "<leader>ts", [[<cmd>lua require("neoscopes").select()<CR>]], desc = "NeoScopes" },
{ "<leader>tb", ":Telescope file_buffers<CR>", desc = "[T]elescope [B]uffers" },
{ "<leader>tf", ":lua find_files()<CR>", desc = "[T]elescope [F]ind Files" },
{ "<leader>tl", ":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>t*", ":lua require('telescope.builtin').grep_string{}<CR>", desc = "[T]elescope current [W]ord" },
{ "<leader>th", ":lua require('telescope.builtin').help_tags{}<CR>", desc = "[T]elescope [H]elp" },

View File

@ -16,7 +16,6 @@ return {
})
end,
keys = {
{ "gr", "<Cmd>Trouble lsp_references<CR>" },
{ "<Leader>xx", "<Cmd>Trouble<CR>" },
{ "<Leader>xw", "<Cmd>Trouble workspace_diagnostics<CR>" },
{ "<Leader>xd", "<Cmd>Trouble document_diagnostics<CR>" },

View File

@ -39,6 +39,8 @@ nnoremap <S-D> <C-D>
nnoremap [e :<c-u>execute 'move -1-'. v:count1<cr>
nnoremap ]e :<c-u>execute 'move +'. v:count1<cr>
nnoremap <space><space> :w<CR>
" Create window splits easier
nnoremap <silent> vv <C-w>v
nnoremap <silent> ss <C-w>s
@ -105,6 +107,6 @@ function! BreakHabitsWindow(message) abort
call nvim_win_set_option(win, 'winhl', 'Normal:CustomFloatingWindow')
endfunction
" let windowHabitsKeys = [",tm"]
" let windowHabitsMessage = ["USE < ,fw > INSTEAD", "BREAK BAD HABITS"]
" let windowHabitsKeys = [":w<cr>"]
" let windowHabitsMessage = ["USE < SPACE SPACE > INSTEAD", "BREAK BAD HABITS"]
" call s:createHabitsMappings(windowHabitsKeys, windowHabitsMessage)

View File

@ -63,6 +63,7 @@ set scrolloff=3 " Minumum lines to keep above and below cursor
set shortmess=A " disable swap
set shortmess+=O
set modifiable
set noscrollbind
set updatetime=100