Merge branch 'dev' into mercury
script: fix screenshot nvim: cleanup lsp config custom icons for packer
This commit is contained in:
commit
ba33d7baad
@ -28,16 +28,6 @@ vim.diagnostic.config({
|
|||||||
update_in_insert = true
|
update_in_insert = true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
local enhance_server_opts = {
|
|
||||||
["clangd"] = function(opts)
|
|
||||||
require("plugin.lsp.clangd").setup(opts)
|
|
||||||
end,
|
|
||||||
["sumneko_lua"] = function(opts)
|
|
||||||
require("plugin.lsp.sumneko_lua").setup(opts)
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
||||||
local on_attach = function(_, bufnr)
|
local on_attach = function(_, bufnr)
|
||||||
local opts = { buffer = bufnr }
|
local opts = { buffer = bufnr }
|
||||||
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts)
|
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts)
|
||||||
@ -67,34 +57,27 @@ end
|
|||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
capabilities = require("cmp_nvim_lsp").update_capabilities(capabilities)
|
capabilities = require("cmp_nvim_lsp").update_capabilities(capabilities)
|
||||||
|
|
||||||
-- Enable the following language servers
|
-- Setup nvim-lsp-installer
|
||||||
local servers = { "clangd", "sumneko_lua" }
|
local servers = { "clangd", "sumneko_lua" }
|
||||||
lsp_installer.setup {
|
lsp_installer.setup {
|
||||||
ensure_installed = servers
|
ensure_installed = servers,
|
||||||
}
|
|
||||||
|
|
||||||
-- Setup nvim-lsp-installer
|
|
||||||
lsp_installer.settings {
|
|
||||||
ui = {
|
ui = {
|
||||||
icons = {
|
icons = {
|
||||||
server_installed = "✓",
|
server_installed = "✓",
|
||||||
server_pending = "o",
|
server_pending = "o",
|
||||||
server_uninstalled = "x"
|
server_uninstalled = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for _, server in ipairs(servers) do
|
for _, server in ipairs(servers) do
|
||||||
local opts = {
|
local opts = {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
}
|
}
|
||||||
|
|
||||||
if enhance_server_opts[server] then
|
local plugin = string.format("%s.%s", "plugin.lsp", server)
|
||||||
-- Enhance the default opts with the server-specific ones
|
require(plugin).setup(opts)
|
||||||
enhance_server_opts[server](opts)
|
|
||||||
end
|
|
||||||
|
|
||||||
lspconfig[server].setup(opts)
|
lspconfig[server].setup(opts)
|
||||||
end
|
end
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
-- Author : swytch
|
-- Author : swytch
|
||||||
-- Created : Friday Mar 12, 2021 22:28:34 CET
|
-- Created : Friday Mar 12, 2021 22:28:34 CET
|
||||||
-- License : GPLv3
|
-- License : GPLv3
|
||||||
-- Description : neovim plugins file
|
-- Description : neovim packer config file
|
||||||
|
|
||||||
|
|
||||||
|
local packer = require("packer")
|
||||||
local install_path = vim.fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
|
local install_path = vim.fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
|
||||||
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
|
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
|
||||||
print("Cloning packer...")
|
print("Cloning packer...")
|
||||||
@ -19,7 +20,18 @@ if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
|
|||||||
print("Done.")
|
print("Done.")
|
||||||
end
|
end
|
||||||
|
|
||||||
local use = require("packer").use
|
packer.init({
|
||||||
|
display = {
|
||||||
|
working_sym = 'o', -- The symbol for a plugin being installed/updated
|
||||||
|
error_sym = '', -- The symbol for a plugin with an error in installation/updating
|
||||||
|
done_sym = '✓', -- The symbol for a plugin which has completed installation/updating
|
||||||
|
removed_sym = '-', -- The symbol for an unused plugin which was removed
|
||||||
|
moved_sym = '→', -- The symbol for a plugin which was moved (e.g. from opt to start)
|
||||||
|
header_sym = '━', -- The symbol for the header line in packer's display
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
local use = packer.use
|
||||||
|
|
||||||
return require("packer").startup(function()
|
return require("packer").startup(function()
|
||||||
-- packer manages itself
|
-- packer manages itself
|
||||||
|
@ -1,4 +1,17 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# @author : swytch
|
||||||
|
# @file : screenshot
|
||||||
|
# @license : GPLv3
|
||||||
|
# @created : Wednesday May 20, 2020 17:52:58 CEST
|
||||||
|
#
|
||||||
|
# @description : grab a screenshot
|
||||||
|
# @deps : scrot xclip dunstify
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
|
||||||
|
sleep .1
|
||||||
if [ "-w" = "$1" ]; then
|
if [ "-w" = "$1" ]; then
|
||||||
scrot -e 'xclip -selection clipboard -t image/png -i $f && rm $f'
|
scrot -e 'xclip -selection clipboard -t image/png -i $f && rm $f'
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user