stuff
This commit is contained in:
@ -1,9 +1,13 @@
|
||||
vim.g.catppuccin_flavour = "macchiato" -- latte, frappe, macchiato, mocha
|
||||
|
||||
local colors = require("catppuccin.palettes").get_palette()
|
||||
|
||||
require("catppuccin").setup({
|
||||
compile_path = vim.fn.stdpath("cache") .. "/catppuccin",
|
||||
transparent_background = false,
|
||||
term_colors = false,
|
||||
dim_inactive = {
|
||||
enabled = false,
|
||||
enabled = true,
|
||||
shade = "dark",
|
||||
percentage = 0.15,
|
||||
},
|
||||
@ -83,5 +87,15 @@ require("catppuccin").setup({
|
||||
},
|
||||
},
|
||||
color_overrides = {},
|
||||
custom_highlights = {},
|
||||
custom_highlights = {
|
||||
-- Type = { fg = colors.blue },
|
||||
-- Function = { fg = colors.sapphire },
|
||||
-- Identifier = { fg = colors.mauve },
|
||||
-- --
|
||||
Function = { fg = colors.mauve },
|
||||
},
|
||||
})
|
||||
|
||||
require('catppuccin').compile()
|
||||
|
||||
vim.api.nvim_command "colorscheme catppuccin"
|
||||
|
@ -4,7 +4,8 @@ require("trouble").setup({
|
||||
height = 10, -- height of the trouble list when position is top or bottom
|
||||
width = 50, -- width of the list when position is left or right
|
||||
icons = true, -- use devicons for filenames
|
||||
mode = "workspace_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist"
|
||||
-- mode = "workspace_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist"
|
||||
mode = "document_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist"
|
||||
fold_open = "", -- icon used for open folds
|
||||
fold_closed = "", -- icon used for closed folds
|
||||
group = true, -- group results by file
|
||||
|
40
vim/.vim/lua/google_comments.lua
Normal file
40
vim/.vim/lua/google_comments.lua
Normal file
@ -0,0 +1,40 @@
|
||||
-- Here are all the options and their default values:
|
||||
require('google.comments').setup {
|
||||
-- The command for fetching comments, refer to `get_comments.par --help` to
|
||||
-- see all the options.
|
||||
-- command = {'/google/bin/releases/editor-devtools/get_comments.par', '--full', '--json', "-x=''"},
|
||||
command = {'/google/bin/releases/editor-devtools/get_comments.par', '--json', '--full', '--noresolved', '--cl_comments', '--file_comments', '--unreplied_only', ' -x ""'},
|
||||
-- Define your own icon by `vim.fn.sign_define('ICON_NAME', {text = ' '})`.
|
||||
-- See :help sign_define
|
||||
-- The sign property passed to setup should be the 'ICON_NAME' in the define
|
||||
-- example above.
|
||||
sign = 'COMMENT_ICON',
|
||||
-- Fetch the comments after calling `setup`.
|
||||
auto_fetch = true,
|
||||
display = {
|
||||
-- The width of the comment display window.
|
||||
width = 50,
|
||||
-- When showing file paths, use relative paths or not.
|
||||
relative_path = true,
|
||||
},
|
||||
--- Enable viewing comments through floating window
|
||||
floating = true,
|
||||
--- Options used when creating the floating window.
|
||||
floating_window_options = require('google.comments.options')
|
||||
.default_floating_window_options,
|
||||
}
|
||||
-- here are some mappings you might want:
|
||||
vim.api.nvim_set_keymap('n', '<Leader>nc',
|
||||
[[<Cmd>lua require('google.comments').goto_next_comment()<CR>]],
|
||||
{ noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<Leader>pc',
|
||||
[[<Cmd>lua require('google.comments').goto_prev_comment()<CR>]],
|
||||
{ noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<Leader>lc',
|
||||
[[<Cmd>lua require('google.comments').toggle_line_comments()<CR>]],
|
||||
{ noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<Leader>ac',
|
||||
[[<Cmd>lua require('google.comments').toggle_all_comments()<CR>]],
|
||||
{ noremap = true, silent = true })
|
||||
|
||||
vim.fn.sign_define('COMMENT_ICON', {text = ''})
|
@ -1,11 +1,12 @@
|
||||
-- 1. Configure CiderLSP
|
||||
local nvim_lsp = require("lspconfig")
|
||||
local configs = require("lspconfig.configs")
|
||||
local notify = require 'notify'
|
||||
configs.ciderlsp = {
|
||||
default_config = {
|
||||
cmd = { "/google/bin/releases/cider/ciderlsp/ciderlsp", "--tooltag=nvim-lsp", "--forward_sync_responses", "--enable_semantic_tokens", "--relay_mode=true", "--hub_addr=blade:languageservices-staging" ,"--enable_document_highlight"},
|
||||
cmd = { "/google/bin/releases/cider/ciderlsp/ciderlsp", "--tooltag=nvim-cmp", "--forward_sync_responses", "--enable_semantic_tokens", "--relay_mode=true", "--hub_addr=blade:languageservices-staging" ,"--enable_document_highlight"},
|
||||
-- cmd = {'/google/bin/releases/cider/ciderlsp/ciderlsp', '--forward_sync_responses', '--enable_document_highlight'};
|
||||
filetypes = { "c", "cpp", "java", "kotlin", "proto", "textproto", "go", "python", "bzl" },
|
||||
filetypes = { "c", "cpp", "java", "kotlin", "objc", "proto", "textproto", "go", "python", "bzl" },
|
||||
root_dir = nvim_lsp.util.root_pattern("BUILD"),
|
||||
settings = {},
|
||||
},
|
||||
@ -121,8 +122,9 @@ cmp.setup({
|
||||
with_text = true,
|
||||
maxwidth = 40, -- half max width
|
||||
menu = {
|
||||
nvim_ciderlsp = "[🤖]",
|
||||
buffer = "[buffer]",
|
||||
-- nvim_ciderlsp = "[]",
|
||||
nvim_ciderlsp = "",
|
||||
buffer = "",
|
||||
nvim_lsp = "[CiderLSP]",
|
||||
nvim_lua = "[API]",
|
||||
path = "[path]",
|
||||
@ -157,7 +159,7 @@ cider_lsp_handlers["$/syncResponse"] = function(_, result, ctx)
|
||||
local first_fire = vim.b['is_cider_lsp_attached'] == 'no'
|
||||
vim.b['is_cider_lsp_attached'] = 'yes'
|
||||
if first_fire then
|
||||
require('notify')('CiderLSP attached', 'info', {timeout=150})
|
||||
notify('CiderLSP attached', 'info', {timeout=500})
|
||||
require('lualine').refresh()
|
||||
end
|
||||
end
|
||||
@ -169,6 +171,23 @@ cider_lsp_handlers["workspace/diagnostic/refresh"] = function(_, result, ctx)
|
||||
VPrint(ctx)
|
||||
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
|
||||
|
||||
-- 3. Set up CiderLSP
|
||||
local on_attach = function(client, bufnr)
|
||||
vim.b['is_cider_lsp_attached'] = 'no'
|
||||
|
Reference in New Issue
Block a user