Compare commits
1 Commits
21837e0336
...
4418786b75
Author | SHA1 | Date | |
---|---|---|---|
4418786b75 |
@ -38,10 +38,10 @@ require("trouble").setup({
|
|||||||
auto_jump = { "lsp_definitions" }, -- for the given modes, automatically jump if there is only a single result
|
auto_jump = { "lsp_definitions" }, -- for the given modes, automatically jump if there is only a single result
|
||||||
signs = {
|
signs = {
|
||||||
-- icons / text used for a diagnostic
|
-- icons / text used for a diagnostic
|
||||||
error = ' ',
|
error = "",
|
||||||
warning = ' ',
|
warning = "",
|
||||||
hint = ' ',
|
hint = "",
|
||||||
information = ' ',
|
information = "",
|
||||||
other = "",
|
other = "",
|
||||||
},
|
},
|
||||||
use_diagnostic_signs = false, -- enabling this will use the signs defined in your lsp client
|
use_diagnostic_signs = false, -- enabling this will use the signs defined in your lsp client
|
190
config/.config/nvim/lua/lsp.lua
Normal file
190
config/.config/nvim/lua/lsp.lua
Normal file
@ -0,0 +1,190 @@
|
|||||||
|
-- 1. Configure CiderLSP
|
||||||
|
local nvim_lsp = require("lspconfig")
|
||||||
|
local configs = require("lspconfig.configs")
|
||||||
|
configs.ciderlsp = {
|
||||||
|
default_config = {
|
||||||
|
cmd = { "/google/bin/releases/cider/ciderlsp/ciderlsp", "--tooltag=nvim-lsp", "--noforward_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" },
|
||||||
|
root_dir = nvim_lsp.util.root_pattern("BUILD"),
|
||||||
|
settings = {},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
local has_words_before = function()
|
||||||
|
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||||
|
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 2. Configure CMP
|
||||||
|
vim.opt.completeopt = { "menu", "menuone", "noselect" }
|
||||||
|
|
||||||
|
-- Don't show the dumb matching stuff
|
||||||
|
vim.opt.shortmess:append("c")
|
||||||
|
|
||||||
|
local lspkind = require("lspkind")
|
||||||
|
lspkind.init()
|
||||||
|
|
||||||
|
local cmp = require("cmp")
|
||||||
|
|
||||||
|
cmp.setup({
|
||||||
|
mapping = {
|
||||||
|
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||||
|
["<C-u>"] = cmp.mapping.scroll_docs(4),
|
||||||
|
["<C-e>"] = cmp.mapping.close(),
|
||||||
|
["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
|
||||||
|
["<C-m>"] = cmp.mapping.confirm({ select = true }),
|
||||||
|
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||||
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_next_item()
|
||||||
|
elseif vim.fn["vsnip#available"](1) == 1 then
|
||||||
|
feedkey("<Plug>(vsnip-expand-or-jump)", "")
|
||||||
|
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
|
||||||
|
end, { "i", "s" }),
|
||||||
|
|
||||||
|
["<S-Tab>"] = cmp.mapping(function()
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
|
elseif vim.fn["vsnip#jumpable"](-1) == 1 then
|
||||||
|
feedkey("<Plug>(vsnip-jump-prev)", "")
|
||||||
|
end
|
||||||
|
end, { "i", "s" }),
|
||||||
|
|
||||||
|
["<Up>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
|
elseif vim.fn["vsnip#available"](1) == 1 then
|
||||||
|
feedkey("<Plug>(vsnip-jump-prev)", "")
|
||||||
|
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()
|
||||||
|
elseif vim.fn["vsnip#available"](1) == 1 then
|
||||||
|
feedkey("<Plug>(vsnip-expand-or-jump)", "")
|
||||||
|
else
|
||||||
|
fallback() -- The fallback function sends a already mapped key. In this case, it's probably `<Tab>`.
|
||||||
|
end
|
||||||
|
end),
|
||||||
|
},
|
||||||
|
|
||||||
|
sources = {
|
||||||
|
{ name = "nvim_lua" },
|
||||||
|
{ name = "nvim_lsp" },
|
||||||
|
{ name = "path" },
|
||||||
|
{ name = "vim_vsnip" },
|
||||||
|
{ name = 'nvim_ciderlsp', priority = 9 },
|
||||||
|
{ name = "buffer", keyword_length = 5 },
|
||||||
|
},
|
||||||
|
|
||||||
|
sorting = {
|
||||||
|
comparators = {
|
||||||
|
cmp.config.compare.offset,
|
||||||
|
cmp.config.compare.exact,
|
||||||
|
cmp.config.compare.score,
|
||||||
|
|
||||||
|
function(entry1, entry2)
|
||||||
|
local _, entry1_under = entry1.completion_item.label:find("^_+")
|
||||||
|
local _, entry2_under = entry2.completion_item.label:find("^_+")
|
||||||
|
entry1_under = entry1_under or 0
|
||||||
|
entry2_under = entry2_under or 0
|
||||||
|
if entry1_under > entry2_under then
|
||||||
|
return false
|
||||||
|
elseif entry1_under < entry2_under then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
|
||||||
|
cmp.config.compare.kind,
|
||||||
|
cmp.config.compare.sort_text,
|
||||||
|
cmp.config.compare.length,
|
||||||
|
cmp.config.compare.order,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
vim.fn["vsnip#anonymous"](args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
formatting = {
|
||||||
|
format = lspkind.cmp_format({
|
||||||
|
with_text = true,
|
||||||
|
maxwidth = 40, -- half max width
|
||||||
|
menu = {
|
||||||
|
nvim_ciderlsp = "[🤖]",
|
||||||
|
buffer = "[buffer]",
|
||||||
|
nvim_lsp = "[CiderLSP]",
|
||||||
|
nvim_lua = "[API]",
|
||||||
|
path = "[path]",
|
||||||
|
vim_vsnip = "[snip]",
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
|
||||||
|
experimental = {
|
||||||
|
native_menu = false,
|
||||||
|
ghost_text = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.cmd([[
|
||||||
|
augroup CmpZsh
|
||||||
|
au!
|
||||||
|
autocmd Filetype zsh lua require'cmp'.setup.buffer { sources = { { name = "zsh" }, } }
|
||||||
|
augroup END
|
||||||
|
]])
|
||||||
|
|
||||||
|
-- 3. Set up CiderLSP
|
||||||
|
local on_attach = function(client, bufnr)
|
||||||
|
vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc")
|
||||||
|
if vim.lsp.formatexpr then -- Neovim v0.6.0+ only.
|
||||||
|
vim.api.nvim_buf_set_option(bufnr, "formatexpr", "v:lua.vim.lsp.formatexpr")
|
||||||
|
end
|
||||||
|
if vim.lsp.tagfunc then
|
||||||
|
vim.api.nvim_buf_set_option(bufnr, "tagfunc", "v:lua.vim.lsp.tagfunc")
|
||||||
|
end
|
||||||
|
|
||||||
|
local opts = { noremap = true, silent = true }
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", opts)
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>ca", "<cmd>lua vim.lsp.buf.code_action()<CR>", opts)
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, "n", "L", "<cmd>lua vim.lsp.buf.hover()<CR>", opts)
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, "n", "g0", "<cmd>lua vim.lsp.buf.document_symbol()<CR>", opts)
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, "n", "gW", "<cmd>lua vim.lsp.buf.workspace_symbol()<CR>", opts)
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, "n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>", opts)
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, "n", "gD", "<cmd>tab split | lua vim.lsp.buf.definition()<CR>", opts)
|
||||||
|
-- vim.api.nvim_buf_set_keymap(bufnr, "n", "gD", "<cmd>lua vim.lsp.buf.declaration()<CR>", opts)
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, "n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, "n", "grf", "<cmd>lua vim.lsp.buf.references()<CR>", opts) -- diagnostics controls references
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, "n", "<C-g>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, "i", "<C-g>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
|
||||||
|
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, "n", "gt", "<cmd>lua vim.lsp.buf.type_definition()<CR>", opts)
|
||||||
|
|
||||||
|
vim.api.nvim_command("augroup LSP")
|
||||||
|
vim.api.nvim_command("autocmd!")
|
||||||
|
if client.resolved_capabilities.document_highlight then
|
||||||
|
vim.api.nvim_command("autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()")
|
||||||
|
vim.api.nvim_command("autocmd CursorHoldI <buffer> lua vim.lsp.buf.document_highlight()")
|
||||||
|
vim.api.nvim_command("autocmd CursorMoved <buffer> lua vim.lsp.util.buf_clear_references()")
|
||||||
|
end
|
||||||
|
vim.api.nvim_command("augroup END")
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||||
|
capabilities = require('cmp_nvim_ciderlsp').update_capabilities(capabilities)
|
||||||
|
|
||||||
|
nvim_lsp.ciderlsp.setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = on_attach,
|
||||||
|
})
|
@ -38,16 +38,14 @@ require('telescope').setup {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
local map = require("utils").map
|
|
||||||
|
|
||||||
-- These custom mappings let you open telescope-codesearch quickly:
|
-- These custom mappings let you open telescope-codesearch quickly:
|
||||||
map('n', '<C-P>',
|
vim.api.nvim_set_keymap('n', '<C-P>',
|
||||||
[[<cmd>lua require('telescope').extensions.codesearch.find_files{}<CR>]],
|
[[<cmd>lua require('telescope').extensions.codesearch.find_files{}<CR>]],
|
||||||
{ noremap = true, silent=true }
|
{ noremap = true, silent=true }
|
||||||
)
|
)
|
||||||
|
|
||||||
-- Search using codesearch queries.
|
-- Search using codesearch queries.
|
||||||
map(
|
vim.api.nvim_set_keymap(
|
||||||
"n",
|
"n",
|
||||||
"<leader>cs",
|
"<leader>cs",
|
||||||
[[<cmd>lua require('telescope').extensions.codesearch.find_query{}<CR>]],
|
[[<cmd>lua require('telescope').extensions.codesearch.find_query{}<CR>]],
|
||||||
@ -55,7 +53,7 @@ map(
|
|||||||
)
|
)
|
||||||
--
|
--
|
||||||
-- Search for files using codesearch queries.
|
-- Search for files using codesearch queries.
|
||||||
map(
|
vim.api.nvim_set_keymap(
|
||||||
"n",
|
"n",
|
||||||
"<leader>cf",
|
"<leader>cf",
|
||||||
[[<cmd>lua require('telescope').extensions.codesearch.find_files{}<CR>]],
|
[[<cmd>lua require('telescope').extensions.codesearch.find_files{}<CR>]],
|
||||||
@ -63,7 +61,7 @@ map(
|
|||||||
)
|
)
|
||||||
|
|
||||||
-- Search for the word under cursor.
|
-- Search for the word under cursor.
|
||||||
map(
|
vim.api.nvim_set_keymap(
|
||||||
"n",
|
"n",
|
||||||
"<leader>CS",
|
"<leader>CS",
|
||||||
[[<cmd>lua require('telescope').extensions.codesearch.find_query{default_text_expand='<cword>'}<CR>]],
|
[[<cmd>lua require('telescope').extensions.codesearch.find_query{default_text_expand='<cword>'}<CR>]],
|
||||||
@ -71,7 +69,7 @@ map(
|
|||||||
)
|
)
|
||||||
|
|
||||||
-- Search for a file having word under cursor in its name.
|
-- Search for a file having word under cursor in its name.
|
||||||
map(
|
vim.api.nvim_set_keymap(
|
||||||
"n",
|
"n",
|
||||||
"<leader>CF",
|
"<leader>CF",
|
||||||
[[<cmd>lua require('telescope').extensions.codesearch.find_files{default_text_expand='<cword>'}<CR>]],
|
[[<cmd>lua require('telescope').extensions.codesearch.find_files{default_text_expand='<cword>'}<CR>]],
|
||||||
@ -79,7 +77,7 @@ map(
|
|||||||
)
|
)
|
||||||
|
|
||||||
-- Search for text selected in Visual mode.
|
-- Search for text selected in Visual mode.
|
||||||
map(
|
vim.api.nvim_set_keymap(
|
||||||
"v",
|
"v",
|
||||||
"<leader>cs",
|
"<leader>cs",
|
||||||
[[<cmd>lua require('telescope').extensions.codesearch.find_query{}<CR>]],
|
[[<cmd>lua require('telescope').extensions.codesearch.find_query{}<CR>]],
|
||||||
@ -87,13 +85,9 @@ map(
|
|||||||
)
|
)
|
||||||
|
|
||||||
-- Search for file having text selected in Visual mode.
|
-- Search for file having text selected in Visual mode.
|
||||||
map(
|
vim.api.nvim_set_keymap(
|
||||||
"v",
|
"v",
|
||||||
"<leader>cf",
|
"<leader>cf",
|
||||||
[[<cmd>lua require('telescope').extensions.codesearch.find_files{}<CR>]],
|
[[<cmd>lua require('telescope').extensions.codesearch.find_files{}<CR>]],
|
||||||
{ noremap = true, silent = true }
|
{ noremap = true, silent = true }
|
||||||
)
|
)
|
||||||
|
|
||||||
map("n",
|
|
||||||
"<leader>ps",
|
|
||||||
[[:Telescope find_files find_command=hg,pstatus,-ma,-n,--template=<CR>]])
|
|
@ -5,17 +5,15 @@ sleep=5
|
|||||||
alive_interval=10
|
alive_interval=10
|
||||||
host=baggins.c.googlers.com
|
host=baggins.c.googlers.com
|
||||||
|
|
||||||
# Tunnel ADB so locally connected devices work on cloudtop.
|
|
||||||
SSH_OPTS="-YXC -R 5037:localhost:5037 -oServerAliveInterval=$alive_interval"
|
SSH_OPTS="-YXC -R 5037:localhost:5037 -oServerAliveInterval=$alive_interval"
|
||||||
|
|
||||||
initial_cloudtop_command="gcertstatus || gcert; tmuxinator dev"
|
tmux_cmd="gcertstatus || gcert; tmuxinator dev"
|
||||||
initial_client_command="gcertstatus || gcert"
|
|
||||||
|
|
||||||
eval $inital_client_command
|
gcertstatus || gcert
|
||||||
|
|
||||||
# Just keep reconnecting upon failure
|
# Just keep reconnecting upon failure
|
||||||
while [ 1 ]; do
|
while [ 1 ]; do
|
||||||
ssh $host -t $SSH_OPTS "$initial_cloudtop_command"
|
ssh $host -t $SSH_OPTS "$tmux_cmd"
|
||||||
|
|
||||||
# Don't reconnect if disconnection not due to error (i.e., user detached)
|
# Don't reconnect if disconnection not due to error (i.e., user detached)
|
||||||
if [ $? -eq 0 ]; then break; fi
|
if [ $? -eq 0 ]; then break; fi
|
||||||
|
@ -1,87 +0,0 @@
|
|||||||
require("catppuccin").setup({
|
|
||||||
compile_path = vim.fn.stdpath("cache") .. "/catppuccin",
|
|
||||||
transparent_background = false,
|
|
||||||
term_colors = false,
|
|
||||||
dim_inactive = {
|
|
||||||
enabled = false,
|
|
||||||
shade = "dark",
|
|
||||||
percentage = 0.15,
|
|
||||||
},
|
|
||||||
styles = {
|
|
||||||
comments = { "italic" },
|
|
||||||
conditionals = { "italic" },
|
|
||||||
loops = {},
|
|
||||||
functions = {},
|
|
||||||
keywords = {},
|
|
||||||
strings = {},
|
|
||||||
variables = {},
|
|
||||||
numbers = {},
|
|
||||||
booleans = {},
|
|
||||||
properties = {},
|
|
||||||
types = {},
|
|
||||||
operators = {},
|
|
||||||
},
|
|
||||||
integrations = {
|
|
||||||
cmp = true,
|
|
||||||
-- coc_nvim = false,
|
|
||||||
dashboard = true,
|
|
||||||
-- fern = false,
|
|
||||||
fidget = true,
|
|
||||||
gitgutter = true,
|
|
||||||
gitsigns = true,
|
|
||||||
-- hop = false,
|
|
||||||
-- illuminate = false,
|
|
||||||
-- leap = false,
|
|
||||||
-- lightspeed = false,
|
|
||||||
-- lsp_saga = false,
|
|
||||||
lsp_trouble = true,
|
|
||||||
-- mason = true,
|
|
||||||
-- markdown = true,
|
|
||||||
-- neogit = false,
|
|
||||||
-- neotest = false,
|
|
||||||
-- neotree = false,
|
|
||||||
notify = true,
|
|
||||||
-- nvimtree = true,
|
|
||||||
-- overseer = false,
|
|
||||||
-- pounce = false,
|
|
||||||
symbols_outline = true,
|
|
||||||
telescope = true,
|
|
||||||
treesitter = true,
|
|
||||||
-- treesitter_context = false,
|
|
||||||
-- ts_rainbow = false,
|
|
||||||
-- vim_sneak = false,
|
|
||||||
-- vimwiki = false,
|
|
||||||
-- which_key = false,
|
|
||||||
|
|
||||||
-- Special integrations, see https://github.com/catppuccin/nvim#special-integrations
|
|
||||||
dap = {
|
|
||||||
enabled = false,
|
|
||||||
enable_ui = false,
|
|
||||||
},
|
|
||||||
indent_blankline = {
|
|
||||||
enabled = true,
|
|
||||||
colored_indent_levels = false,
|
|
||||||
},
|
|
||||||
native_lsp = {
|
|
||||||
enabled = true,
|
|
||||||
virtual_text = {
|
|
||||||
errors = { "italic" },
|
|
||||||
hints = { "italic" },
|
|
||||||
warnings = { "italic" },
|
|
||||||
information = { "italic" },
|
|
||||||
},
|
|
||||||
underlines = {
|
|
||||||
errors = { "underline" },
|
|
||||||
hints = { "underline" },
|
|
||||||
warnings = { "underline" },
|
|
||||||
information = { "underline" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
navic = {
|
|
||||||
enabled = false,
|
|
||||||
custom_bg = "NONE",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
color_overrides = {},
|
|
||||||
custom_highlights = {},
|
|
||||||
})
|
|
@ -1,235 +0,0 @@
|
|||||||
-- 1. Configure CiderLSP
|
|
||||||
local nvim_lsp = require("lspconfig")
|
|
||||||
local configs = require("lspconfig.configs")
|
|
||||||
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', '--forward_sync_responses', '--enable_document_highlight'};
|
|
||||||
filetypes = { "c", "cpp", "java", "kotlin", "proto", "textproto", "go", "python", "bzl" },
|
|
||||||
root_dir = nvim_lsp.util.root_pattern("BUILD"),
|
|
||||||
settings = {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
local has_words_before = function()
|
|
||||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
|
||||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
|
||||||
end
|
|
||||||
|
|
||||||
-- 2. Configure CMP
|
|
||||||
vim.opt.completeopt = { "menu", "menuone", "noselect" }
|
|
||||||
|
|
||||||
-- Don't show the dumb matching stuff
|
|
||||||
vim.opt.shortmess:append("c")
|
|
||||||
|
|
||||||
local lspkind = require("lspkind")
|
|
||||||
lspkind.init()
|
|
||||||
|
|
||||||
local cmp = require("cmp")
|
|
||||||
|
|
||||||
cmp.setup({
|
|
||||||
mapping = {
|
|
||||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
|
||||||
["<C-u>"] = cmp.mapping.scroll_docs(4),
|
|
||||||
["<C-e>"] = cmp.mapping.close(),
|
|
||||||
["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
|
|
||||||
["<C-m>"] = cmp.mapping.confirm({ select = true }),
|
|
||||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_next_item()
|
|
||||||
elseif vim.fn["vsnip#available"](1) == 1 then
|
|
||||||
feedkey("<Plug>(vsnip-expand-or-jump)", "")
|
|
||||||
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
|
|
||||||
end, { "i", "s" }),
|
|
||||||
|
|
||||||
["<S-Tab>"] = cmp.mapping(function()
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_prev_item()
|
|
||||||
elseif vim.fn["vsnip#jumpable"](-1) == 1 then
|
|
||||||
feedkey("<Plug>(vsnip-jump-prev)", "")
|
|
||||||
end
|
|
||||||
end, { "i", "s" }),
|
|
||||||
|
|
||||||
["<Up>"] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_prev_item()
|
|
||||||
elseif vim.fn["vsnip#available"](1) == 1 then
|
|
||||||
feedkey("<Plug>(vsnip-jump-prev)", "")
|
|
||||||
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()
|
|
||||||
elseif vim.fn["vsnip#available"](1) == 1 then
|
|
||||||
feedkey("<Plug>(vsnip-expand-or-jump)", "")
|
|
||||||
else
|
|
||||||
fallback() -- The fallback function sends a already mapped key. In this case, it's probably `<Tab>`.
|
|
||||||
end
|
|
||||||
end),
|
|
||||||
},
|
|
||||||
|
|
||||||
sources = {
|
|
||||||
{ name = "nvim_lua" },
|
|
||||||
{ name = "nvim_lsp" },
|
|
||||||
{ name = "path" },
|
|
||||||
{ name = "vim_vsnip" },
|
|
||||||
{ name = 'nvim_ciderlsp', priority = 9 },
|
|
||||||
{ name = "buffer", keyword_length = 5 },
|
|
||||||
},
|
|
||||||
|
|
||||||
sorting = {
|
|
||||||
comparators = {
|
|
||||||
cmp.config.compare.offset,
|
|
||||||
cmp.config.compare.exact,
|
|
||||||
cmp.config.compare.score,
|
|
||||||
|
|
||||||
function(entry1, entry2)
|
|
||||||
local _, entry1_under = entry1.completion_item.label:find("^_+")
|
|
||||||
local _, entry2_under = entry2.completion_item.label:find("^_+")
|
|
||||||
entry1_under = entry1_under or 0
|
|
||||||
entry2_under = entry2_under or 0
|
|
||||||
if entry1_under > entry2_under then
|
|
||||||
return false
|
|
||||||
elseif entry1_under < entry2_under then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
|
|
||||||
cmp.config.compare.kind,
|
|
||||||
cmp.config.compare.sort_text,
|
|
||||||
cmp.config.compare.length,
|
|
||||||
cmp.config.compare.order,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
vim.fn["vsnip#anonymous"](args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
formatting = {
|
|
||||||
format = lspkind.cmp_format({
|
|
||||||
with_text = true,
|
|
||||||
maxwidth = 40, -- half max width
|
|
||||||
menu = {
|
|
||||||
nvim_ciderlsp = "[🤖]",
|
|
||||||
buffer = "[buffer]",
|
|
||||||
nvim_lsp = "[CiderLSP]",
|
|
||||||
nvim_lua = "[API]",
|
|
||||||
path = "[path]",
|
|
||||||
vim_vsnip = "[snip]",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
|
|
||||||
experimental = {
|
|
||||||
native_menu = false,
|
|
||||||
ghost_text = true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.cmd([[
|
|
||||||
augroup CmpZsh
|
|
||||||
au!
|
|
||||||
autocmd Filetype zsh lua require'cmp'.setup.buffer { sources = { { name = "zsh" }, } }
|
|
||||||
augroup END
|
|
||||||
]])
|
|
||||||
|
|
||||||
local cider_lsp_handlers = {
|
|
||||||
["textDocument/publishDiagnostics"] = vim.lsp.with(
|
|
||||||
vim.lsp.diagnostic.on_publish_diagnostics, {
|
|
||||||
underline = true,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
cider_lsp_handlers["$/syncResponse"] = function(_, result, ctx)
|
|
||||||
-- is_cider_lsp_attached has been setup via on_init, but hasn't received
|
|
||||||
-- sync response yet.
|
|
||||||
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})
|
|
||||||
require('lualine').refresh()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
cider_lsp_handlers["workspace/diagnostic/refresh"] = function(_, result, ctx)
|
|
||||||
VPrint('result:')
|
|
||||||
VPrint(result)
|
|
||||||
VPrint('ctx:')
|
|
||||||
VPrint(ctx)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- 3. Set up CiderLSP
|
|
||||||
local on_attach = function(client, bufnr)
|
|
||||||
vim.b['is_cider_lsp_attached'] = 'no'
|
|
||||||
require('lualine').refresh()
|
|
||||||
|
|
||||||
vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc")
|
|
||||||
if vim.lsp.formatexpr then -- Neovim v0.6.0+ only.
|
|
||||||
vim.api.nvim_buf_set_option(bufnr, "formatexpr", "v:lua.vim.lsp.formatexpr")
|
|
||||||
end
|
|
||||||
if vim.lsp.tagfunc then
|
|
||||||
vim.api.nvim_buf_set_option(bufnr, "tagfunc", "v:lua.vim.lsp.tagfunc")
|
|
||||||
end
|
|
||||||
|
|
||||||
local opts = { noremap = true, silent = true }
|
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", opts)
|
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>ca", "<cmd>lua vim.lsp.buf.code_action()<CR>", opts)
|
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "L", "<cmd>lua vim.lsp.buf.hover()<CR>", opts)
|
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "g0", "<cmd>lua vim.lsp.buf.document_symbol()<CR>", opts)
|
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "gW", "<cmd>lua vim.lsp.buf.workspace_symbol()<CR>", opts)
|
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>", opts)
|
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "gD", "<cmd>tab split | lua vim.lsp.buf.definition()<CR>", opts)
|
|
||||||
-- vim.api.nvim_buf_set_keymap(bufnr, "n", "gD", "<cmd>lua vim.lsp.buf.declaration()<CR>", opts)
|
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
|
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "grf", "<cmd>lua vim.lsp.buf.references()<CR>", opts) -- diagnostics controls references
|
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "<C-g>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
|
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, "i", "<C-g>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
|
|
||||||
|
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "gt", "<cmd>lua vim.lsp.buf.type_definition()<CR>", opts)
|
|
||||||
|
|
||||||
vim.api.nvim_command("augroup LSP")
|
|
||||||
vim.api.nvim_command("autocmd!")
|
|
||||||
if client.resolved_capabilities.document_highlight then
|
|
||||||
vim.api.nvim_command("autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()")
|
|
||||||
vim.api.nvim_command("autocmd CursorHoldI <buffer> lua vim.lsp.buf.document_highlight()")
|
|
||||||
vim.api.nvim_command("autocmd CursorMoved <buffer> lua vim.lsp.util.buf_clear_references()")
|
|
||||||
end
|
|
||||||
vim.api.nvim_command("augroup END")
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
|
||||||
capabilities = require('cmp_nvim_ciderlsp').update_capabilities(capabilities)
|
|
||||||
capabilities['codeLens'] = {dynamicRegistration=false}
|
|
||||||
-- capabilities.workspace.codeLens = {refreshSupport=true}
|
|
||||||
-- capabilities.workspace.diagnostics = {refreshSupport=true}
|
|
||||||
capabilities.textDocument.publishDiagnostics={
|
|
||||||
relatedInformation=true,
|
|
||||||
versionSupport=false,
|
|
||||||
tagSupport={
|
|
||||||
valueSet={
|
|
||||||
1,
|
|
||||||
2
|
|
||||||
}
|
|
||||||
},
|
|
||||||
codeDescriptionSupport=true,
|
|
||||||
dataSupport=true,
|
|
||||||
--layeredDiagnostics=true
|
|
||||||
}
|
|
||||||
|
|
||||||
nvim_lsp.ciderlsp.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
handlers = cider_lsp_handlers,
|
|
||||||
})
|
|
@ -1,77 +0,0 @@
|
|||||||
local split = function (inputstr, sep)
|
|
||||||
local t={}
|
|
||||||
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
|
|
||||||
table.insert(t, str)
|
|
||||||
end
|
|
||||||
return t
|
|
||||||
end
|
|
||||||
local function getWords()
|
|
||||||
return tostring(vim.fn.wordcount().words)
|
|
||||||
end
|
|
||||||
local function getCitc()
|
|
||||||
local fname = vim.api.nvim_buf_get_name(0)
|
|
||||||
if string.find(fname, '/google/src/cloud/', 1, true) then
|
|
||||||
local parts = split(fname, '/')
|
|
||||||
return parts[5]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
function isCiderLspAttached()
|
|
||||||
if vim.b['is_cider_lsp_attached'] then
|
|
||||||
if vim.b['is_cider_lsp_attached'] == 'yes' then
|
|
||||||
return '✓'
|
|
||||||
else
|
|
||||||
return 'CiderLSP loading..'
|
|
||||||
end
|
|
||||||
else
|
|
||||||
return ''
|
|
||||||
end
|
|
||||||
end
|
|
||||||
local function getLightbulb()
|
|
||||||
return require('nvim-lightbulb').get_status_text()
|
|
||||||
end
|
|
||||||
|
|
||||||
require('lualine').setup {
|
|
||||||
options = {
|
|
||||||
theme = 'auto',
|
|
||||||
globalstatus = false,
|
|
||||||
refresh = {
|
|
||||||
statusline = 1000,
|
|
||||||
tabline = 1000,
|
|
||||||
winbar = 1000,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
sections = {
|
|
||||||
lualine_a = {'mode'},
|
|
||||||
lualine_b = {'branch', 'diff', getCitc, isCiderLspAttached},
|
|
||||||
lualine_c = {'filename', {"aerial", depth=-1}, getLightbulb},
|
|
||||||
lualine_x = {'filetype'},
|
|
||||||
lualine_x = {
|
|
||||||
{ 'diagnostics', sources = {"nvim_lsp"}, symbols = {error = ' ', warn = ' ', info = ' ', hint = ' '} },
|
|
||||||
'encoding',
|
|
||||||
'filetype'
|
|
||||||
},
|
|
||||||
lualine_y = {},
|
|
||||||
lualine_z = {'location'}
|
|
||||||
},
|
|
||||||
-- default
|
|
||||||
-- 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 = {}
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
local colors = require("catppuccin.palettes").get_palette()
|
|
||||||
require("notify").setup({
|
|
||||||
background_colour = colors.base,
|
|
||||||
})
|
|
@ -1,18 +0,0 @@
|
|||||||
-- Require CiderLSP and Diagnostics modules
|
|
||||||
-- IMPORTANT: Must come after plugins are loaded
|
|
||||||
|
|
||||||
-- CiderLSP
|
|
||||||
vim.opt.completeopt = { "menu", "menuone", "noselect" }
|
|
||||||
|
|
||||||
require 'lspconfig'
|
|
||||||
|
|
||||||
require("lsp")
|
|
||||||
require("diagnostics")
|
|
||||||
require("treesitter")
|
|
||||||
require("telescope_config")
|
|
||||||
require("lualine_config")
|
|
||||||
require("notify_config")
|
|
||||||
require("catppuccin-config")
|
|
||||||
require("symbols-outline-config")
|
|
||||||
|
|
||||||
require "fidget".setup{}
|
|
@ -1,4 +0,0 @@
|
|||||||
require("symbols-outline").setup()
|
|
||||||
|
|
||||||
local map = require("utils").map
|
|
||||||
map('n', '<leader>so', ':SymbolsOutline<cr>')
|
|
@ -1,11 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
function M.map(mode, lhs, rhs, opts)
|
|
||||||
local options = { noremap = true }
|
|
||||||
if opts then
|
|
||||||
options = vim.tbl_extend("force", options, opts)
|
|
||||||
end
|
|
||||||
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
Submodule vim/.vim/plugged/asyncrun.vim updated: eae766d218...7ee75ae20c
Submodule vim/.vim/plugged/catppuccin deleted from d5f8176232
Submodule vim/.vim/plugged/cmp-nvim-lsp updated: 3cf38d9c95...affe808a5c
Submodule vim/.vim/plugged/cmp-path updated: 91ff86cd9c...447c87cdd6
Submodule vim/.vim/plugged/cmp-vsnip updated: 1ae05c6c86...0abfa1860f
Submodule vim/.vim/plugged/fidget.nvim deleted from 1097a86db8
Submodule vim/.vim/plugged/google-comments updated: ad50cd3c71...95d63cd2cf
Submodule vim/.vim/plugged/lualine.nvim deleted from edca2b03c7
Submodule vim/.vim/plugged/nerdcommenter updated: fe74a1b890...2a0a05ff98
Submodule vim/.vim/plugged/nord-vim updated: 0748955e9e...bc0f057162
Submodule vim/.vim/plugged/nvim-cmp updated: e94d348931...2427d06b65
Submodule vim/.vim/plugged/nvim-lspconfig updated: 2dd9e060f2...dc4dac8fcb
Submodule vim/.vim/plugged/nvim-notify deleted from 5e8d494297
Submodule vim/.vim/plugged/nvim-treesitter updated: 9279bfea5e...0289160c96
Submodule vim/.vim/plugged/nvim-web-devicons updated: 9061e2d355...969728506c
Submodule vim/.vim/plugged/onedark.vim updated: b6b5ffe31a...1fe54f212f
Submodule vim/.vim/plugged/plenary.nvim updated: 4b7e52044b...62dc2a7acd
Submodule vim/.vim/plugged/registers.nvim updated: a87a7c57dc...23f9efc71c
Submodule vim/.vim/plugged/symbols-outline.nvim deleted from 6a3ed24c56
Submodule vim/.vim/plugged/telescope.nvim updated: f174a0367b...30e2dc5232
Submodule vim/.vim/plugged/trouble.nvim updated: ed65f84abc...929315ea5f
Submodule vim/.vim/plugged/ultisnips updated: e99fdf15cd...1914ef242a
Submodule vim/.vim/plugged/undotree updated: bd60cb564e...bf76bf2d1a
1
vim/.vim/plugged/vim-airline
Submodule
1
vim/.vim/plugged/vim-airline
Submodule
Submodule vim/.vim/plugged/vim-airline added at 78abec3b83
Submodule vim/.vim/plugged/vim-snippets updated: b47c2e3723...faaa499189
Submodule vim/.vim/plugged/vim-tmux-navigator updated: bd4c38be5b...afb45a55b4
Submodule vim/.vim/plugged/vim-vsnip updated: 7de8a71e5d...8f199ef690
@ -174,6 +174,7 @@ com! -nargs=? -complete=file Blame :call G4Blame(<f-args>)
|
|||||||
|
|
||||||
nnoremap <leader>cc :CritiqueUnresolvedComments<space><cr>
|
nnoremap <leader>cc :CritiqueUnresolvedComments<space><cr>
|
||||||
nnoremap <leader>s :call CitCObsession()<CR>
|
nnoremap <leader>s :call CitCObsession()<CR>
|
||||||
|
nnoremap <leader>g :GoogleOutlineWindow<CR>
|
||||||
|
|
||||||
" nnoremap <leader>ps :PiperSelectActiveFiles<CR>
|
" nnoremap <leader>ps :PiperSelectActiveFiles<CR>
|
||||||
nnoremap <leader>ps :FzfHgFiles<CR>
|
nnoremap <leader>ps :FzfHgFiles<CR>
|
||||||
|
@ -115,13 +115,3 @@ nmap <leader>e :e %%
|
|||||||
vnoremap <leader>p "_dP
|
vnoremap <leader>p "_dP
|
||||||
|
|
||||||
nnoremap <leader>rp :VimuxOpenRunner<cr> :VimuxRunCommand '!!'<cr> :call VimuxSendKeys("Enter")<cr>
|
nnoremap <leader>rp :VimuxOpenRunner<cr> :VimuxRunCommand '!!'<cr> :call VimuxSendKeys("Enter")<cr>
|
||||||
|
|
||||||
"Showing highlight groups
|
|
||||||
" nmap <leader>sp :call <SID>SynStack()<CR>
|
|
||||||
nmap <leader>shg :call <SID>SynStack()<CR>
|
|
||||||
function! <SID>SynStack()
|
|
||||||
if !exists("*synstack")
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
|
|
||||||
endfunc
|
|
||||||
|
@ -13,8 +13,6 @@ Plug 'hrsh7th/nvim-cmp'
|
|||||||
Plug 'hrsh7th/vim-vsnip'
|
Plug 'hrsh7th/vim-vsnip'
|
||||||
Plug 'neovim/nvim-lspconfig'
|
Plug 'neovim/nvim-lspconfig'
|
||||||
Plug 'onsails/lspkind.nvim'
|
Plug 'onsails/lspkind.nvim'
|
||||||
Plug 'j-hui/fidget.nvim'
|
|
||||||
Plug 'simrat39/symbols-outline.nvim'
|
|
||||||
" required only for diagnostics
|
" required only for diagnostics
|
||||||
Plug 'folke/trouble.nvim'
|
Plug 'folke/trouble.nvim'
|
||||||
|
|
||||||
@ -28,10 +26,8 @@ Plug 'sso://user/vintharas/telescope-codesearch.nvim'
|
|||||||
Plug 'ntpeters/vim-better-whitespace' "auto-set tab/space size
|
Plug 'ntpeters/vim-better-whitespace' "auto-set tab/space size
|
||||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||||
Plug 'junegunn/fzf.vim'
|
Plug 'junegunn/fzf.vim'
|
||||||
Plug 'nvim-lualine/lualine.nvim'
|
Plug 'vim-airline/vim-airline' " ...
|
||||||
Plug 'rcarriga/nvim-notify'
|
Plug 'vim-airline/vim-airline-themes'
|
||||||
" Plug 'vim-airline/vim-airline' " ...
|
|
||||||
" Plug 'vim-airline/vim-airline-themes'
|
|
||||||
Plug 'nathanaelkane/vim-indent-guides'
|
Plug 'nathanaelkane/vim-indent-guides'
|
||||||
Plug 'Konfekt/vim-scratchpad'
|
Plug 'Konfekt/vim-scratchpad'
|
||||||
Plug 'guns/xterm-color-table.vim'
|
Plug 'guns/xterm-color-table.vim'
|
||||||
@ -113,7 +109,6 @@ Plug 'junegunn/vim-easy-align'
|
|||||||
Plug 'tommcdo/vim-exchange'
|
Plug 'tommcdo/vim-exchange'
|
||||||
|
|
||||||
" THEMES
|
" THEMES
|
||||||
Plug 'catppuccin/nvim', { 'as': 'catppuccin' }
|
|
||||||
Plug 'altercation/vim-colors-solarized'
|
Plug 'altercation/vim-colors-solarized'
|
||||||
Plug 'vim-airline/vim-airline-themes'
|
Plug 'vim-airline/vim-airline-themes'
|
||||||
Plug 'jdkanani/vim-material-theme'
|
Plug 'jdkanani/vim-material-theme'
|
||||||
|
20
vim/.vimrc
20
vim/.vimrc
@ -2,7 +2,6 @@ set nocompatible " be iMproved, required
|
|||||||
|
|
||||||
let mapleader="," " BEST LEADER OF ALL TIME (BLOT)
|
let mapleader="," " BEST LEADER OF ALL TIME (BLOT)
|
||||||
filetype off " required
|
filetype off " required
|
||||||
set rtp+=~/.vim
|
|
||||||
set rtp+=~/.vim/after
|
set rtp+=~/.vim/after
|
||||||
|
|
||||||
set directory=/tmp
|
set directory=/tmp
|
||||||
@ -99,8 +98,19 @@ call plug#begin('~/.vim/plugged')
|
|||||||
source ~/.vim/prefs/airline.vim
|
source ~/.vim/prefs/airline.vim
|
||||||
call plug#end() " required
|
call plug#end() " required
|
||||||
|
|
||||||
lua require("plugins")
|
" Require CiderLSP and Diagnostics modules
|
||||||
|
" IMPORTANT: Must come after plugins are loaded
|
||||||
|
lua << EOF
|
||||||
|
-- CiderLSP
|
||||||
|
vim.opt.completeopt = { "menu", "menuone", "noselect" }
|
||||||
|
|
||||||
|
require 'lspconfig'
|
||||||
|
require("lsp")
|
||||||
|
require("diagnostics")
|
||||||
|
require("treesitter")
|
||||||
|
require("telescope_config")
|
||||||
|
|
||||||
|
EOF
|
||||||
if filereadable(expand("~/use_google"))
|
if filereadable(expand("~/use_google"))
|
||||||
source ~/.vim/prefs/cmp.vim
|
source ~/.vim/prefs/cmp.vim
|
||||||
source ~/.vim/prefs/imp.vim
|
source ~/.vim/prefs/imp.vim
|
||||||
@ -142,12 +152,8 @@ if (has("termguicolors"))
|
|||||||
endif
|
endif
|
||||||
set background=dark
|
set background=dark
|
||||||
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
|
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
|
||||||
|
colorscheme quantum
|
||||||
" colorscheme quantum
|
|
||||||
let g:catppuccin_flavour = "macchiato" " latte, frappe, macchiato, mocha
|
|
||||||
colorscheme catppuccin
|
|
||||||
let g:airline_theme='quantum'
|
let g:airline_theme='quantum'
|
||||||
|
|
||||||
set modifiable
|
set modifiable
|
||||||
set omnifunc= completeopt=menuone,noinsert,noselect
|
set omnifunc= completeopt=menuone,noinsert,noselect
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user