plugin config(symbols outline, catpuccin, lsp)
This commit is contained in:
@ -89,6 +89,7 @@ require("catppuccin").setup({
|
|||||||
color_overrides = {},
|
color_overrides = {},
|
||||||
custom_highlights = {
|
custom_highlights = {
|
||||||
Identifier = { fg = colors.lavender },
|
Identifier = { fg = colors.lavender },
|
||||||
|
Statement = { fg = colors.rosewater },
|
||||||
-- Identifier = { fg = colors.sapphire },
|
-- Identifier = { fg = colors.sapphire },
|
||||||
Function = { fg = colors.mauve },
|
Function = { fg = colors.mauve },
|
||||||
},
|
},
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
-- 1. Configure CiderLSP
|
-- 1. Configure CiderLSP
|
||||||
local nvim_lsp = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
local configs = require("lspconfig.configs")
|
local configs = require("lspconfig.configs")
|
||||||
local notify = require 'notify'
|
local notify = require 'notify'
|
||||||
configs.ciderlsp = {
|
configs.ciderlsp = {
|
||||||
@ -7,7 +7,7 @@ configs.ciderlsp = {
|
|||||||
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", "--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'};
|
-- cmd = {'/google/bin/releases/cider/ciderlsp/ciderlsp', '--forward_sync_responses', '--enable_document_highlight'};
|
||||||
filetypes = { "c", "cpp", "java", "kotlin", "objc", "proto", "textproto", "go", "python", "bzl" },
|
filetypes = { "c", "cpp", "java", "kotlin", "objc", "proto", "textproto", "go", "python", "bzl" },
|
||||||
root_dir = nvim_lsp.util.root_pattern("BUILD"),
|
root_dir = lspconfig.util.root_pattern("BUILD"),
|
||||||
settings = {},
|
settings = {},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -28,7 +28,7 @@ lspkind.init()
|
|||||||
|
|
||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
|
|
||||||
require'cmp'.setup.cmdline(':', {
|
cmp.setup.cmdline(':', {
|
||||||
sources = {
|
sources = {
|
||||||
{ name = 'cmdline' }
|
{ name = 'cmdline' }
|
||||||
}
|
}
|
||||||
@ -182,10 +182,6 @@ end
|
|||||||
cider_lsp_handlers["workspace/diagnostic/refresh"] = function(_, result, ctx)
|
cider_lsp_handlers["workspace/diagnostic/refresh"] = function(_, result, ctx)
|
||||||
notify('result:'..result, 'info', {timeout=900})
|
notify('result:'..result, 'info', {timeout=900})
|
||||||
notify('ctx:'..ctx, 'info', {timeout=900})
|
notify('ctx:'..ctx, 'info', {timeout=900})
|
||||||
|
|
||||||
VPrint(result)
|
|
||||||
VPrint('ctx:')
|
|
||||||
VPrint(ctx)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
cider_lsp_handlers['window/showMessage'] = function(_, result, ctx)
|
cider_lsp_handlers['window/showMessage'] = function(_, result, ctx)
|
||||||
@ -264,8 +260,37 @@ capabilities.textDocument.publishDiagnostics={
|
|||||||
--layeredDiagnostics=true
|
--layeredDiagnostics=true
|
||||||
}
|
}
|
||||||
|
|
||||||
nvim_lsp.ciderlsp.setup({
|
lspconfig.ciderlsp.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
handlers = cider_lsp_handlers,
|
handlers = cider_lsp_handlers,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local runtime_path = vim.split(package.path, ";")
|
||||||
|
table.insert(runtime_path, "lua/?.lua")
|
||||||
|
table.insert(runtime_path, "lua/?/init.lua")
|
||||||
|
|
||||||
|
lspconfig.sumneko_lua.setup({
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
runtime = {
|
||||||
|
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
||||||
|
version = "LuaJIT",
|
||||||
|
-- Setup your lua path
|
||||||
|
path = runtime_path,
|
||||||
|
},
|
||||||
|
diagnostics = {
|
||||||
|
-- Get the language server to recognize the `vim` global
|
||||||
|
globals = { "vim" },
|
||||||
|
},
|
||||||
|
workspace = {
|
||||||
|
-- Make the server aware of Neovim runtime files
|
||||||
|
library = vim.api.nvim_get_runtime_file("", true),
|
||||||
|
},
|
||||||
|
-- Do not send telemetry data containing a randomized but unique identifier
|
||||||
|
telemetry = {
|
||||||
|
enable = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
@ -1,4 +1,23 @@
|
|||||||
require("symbols-outline").setup()
|
require("symbols-outline").setup(
|
||||||
|
{
|
||||||
|
show_relative_numbers = true,
|
||||||
|
keymaps = { -- These keymaps can be a string or a table for multiple keys
|
||||||
|
-- close = {"<Esc>", "q"},
|
||||||
|
-- goto_location = "<Cr>",
|
||||||
|
-- focus_location = "o",
|
||||||
|
-- hover_symbol = "<C-space>",
|
||||||
|
toggle_preview = "L",
|
||||||
|
-- rename_symbol = "r",
|
||||||
|
-- code_actions = "a",
|
||||||
|
-- fold = "h",
|
||||||
|
-- unfold = "l",
|
||||||
|
fold_all = "H",
|
||||||
|
unfold_all = "L",
|
||||||
|
fold_reset = "R",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
local map = require("utils").map
|
local map = require("utils").map
|
||||||
map('n', '<leader>so', ':SymbolsOutline<cr>')
|
map('n', '<leader>so', ':SymbolsOutline<cr>')
|
||||||
|
map('n', '<leader>o', ':SymbolsOutline<cr>')
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
# For running crow against a remote X server
|
# For running crow against a remote X server
|
||||||
# xhost +
|
# xhost +
|
||||||
export PATH=$PATH:/google/src/head/depot/google3/experimental/users/cnieves/util
|
export PATH=$PATH:/google/src/head/depot/google3/experimental/users/cnieves/util
|
||||||
|
export PATH="${HOME}/.config/lsp/lua-language-server/bin:${PATH}"
|
||||||
export XAUTHORITY=~/.Xauthority
|
export XAUTHORITY=~/.Xauthority
|
||||||
export GOROOT=/usr/lib/google-golang
|
export GOROOT=/usr/lib/google-golang
|
||||||
export PATH=$GOROOT/bin:$PATH
|
export PATH=$GOROOT/bin:$PATH
|
||||||
|
@ -251,3 +251,5 @@ export ZSH="$HOME/.oh-my-zsh"
|
|||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
source ~/.bash_profile
|
source ~/.bash_profile
|
||||||
|
|
||||||
|
alias luamake=/luamake
|
||||||
|
Reference in New Issue
Block a user