Compare commits
3 Commits
857a4f16b7
...
94602ebb32
Author | SHA1 | Date |
---|---|---|
|
94602ebb32 | |
|
3219964cb3 | |
|
939e4ae8e8 |
|
@ -37,9 +37,11 @@ return { -- Autocompletion
|
|||
-- into multiple repos for maintenance purposes.
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-path",
|
||||
"onsails/lspkind.nvim",
|
||||
},
|
||||
config = function()
|
||||
-- See `:help cmp`
|
||||
local lspkind = require("lspkind")
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
luasnip.config.setup({})
|
||||
|
@ -115,6 +117,40 @@ return { -- Autocompletion
|
|||
{ name = "luasnip" },
|
||||
{ name = "path" },
|
||||
},
|
||||
|
||||
formatting = {
|
||||
fields = { "kind", "abbr", "menu" },
|
||||
expandable_indicator = true,
|
||||
format = lspkind.cmp_format({
|
||||
mode = "symbol_text", -- show only symbol annotations
|
||||
menu = {
|
||||
buffer = "[Buffer]",
|
||||
nvim_lsp = "[LSP]",
|
||||
luasnip = "[LuaSnip]",
|
||||
nvim_lua = "[Lua]",
|
||||
latex_symbols = "[Latex]",
|
||||
},
|
||||
maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
|
||||
-- can also be a function to dynamically calculate max width such as
|
||||
-- maxwidth = function() return math.floor(0.45 * vim.o.columns) end,
|
||||
ellipsis_char = "...", -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
|
||||
show_labelDetails = true, -- show labelDetails in menu. Disabled by default
|
||||
-- The function below will be called before any actual modifications from lspkind
|
||||
-- so that you can provide more controls on popup customization. (See [#30](https://github.com/onsails/lspkind-nvim/pull/30))
|
||||
before = function(entry, vim_item)
|
||||
return vim_item
|
||||
end,
|
||||
}),
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered({
|
||||
col_offset = -3,
|
||||
side_padding = 1,
|
||||
}),
|
||||
documentation = cmp.config.window.bordered({
|
||||
winhighlight = "Normal:CursorLine",
|
||||
}),
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
|
@ -58,12 +58,6 @@ return {
|
|||
-- VertSplit = { fg = "muted", bg = "muted" },
|
||||
Folded = { fg = "foam", bg = "highlight_med" },
|
||||
CursorLine = { bg = "surface" },
|
||||
|
||||
ModesInsert = { bg = "gold" },
|
||||
--cursor line
|
||||
ModesInsertCursorLine = { bg = "overlay" },
|
||||
ModesVisual = { bg = "foam" },
|
||||
ModesVisualVisual = { bg = "pine" },
|
||||
},
|
||||
|
||||
before_highlight = function(group, highlight, palette)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#! /bin/bash
|
||||
bgsDirectory="${HOME}/bgs/"
|
||||
slideshow() {
|
||||
gsettings set org.cinnamon.desktop.background.slideshow slideshow-enabled ${1}
|
||||
gsettings set org.cinnamon.desktop.background.slideshow slideshow-enabled "${1}"
|
||||
}
|
||||
setDirectory() {
|
||||
gsettings set org.cinnamon.desktop.background.slideshow image-source "directory:///${bgsDirectory}${1}"
|
||||
|
@ -22,7 +22,7 @@ slideshowEnabled=$(gsettings get org.cinnamon.desktop.background.slideshow slide
|
|||
|
||||
chooseRandom(){
|
||||
shopt -s nullglob
|
||||
files=(${1}*)
|
||||
files=("${1}"*)
|
||||
length=$((${#files[@]}))
|
||||
echo "length: ${length}"
|
||||
randomIndex=$(($RANDOM % $length))
|
||||
|
@ -30,23 +30,23 @@ chooseRandom(){
|
|||
setImage "${files[$randomIndex]}"
|
||||
}
|
||||
slideshowOrRandom(){
|
||||
if [ "$#" -gt 1 -a "$2" = r ]; then
|
||||
if [ "$#" -gt 1 ]&&[ "$2" = r ]; then
|
||||
slideshow false
|
||||
chooseRandom "${bgsDirectory}${1}"
|
||||
else
|
||||
slideshow true
|
||||
setDirectory ${1}
|
||||
setDirectory "${1}"
|
||||
fi
|
||||
}
|
||||
case $1 in
|
||||
c)
|
||||
slideshowOrRandom "chsck/" $2
|
||||
slideshowOrRandom "chsck/" "$2"
|
||||
;;
|
||||
l)
|
||||
slideshowOrRandom "leics/" $2
|
||||
slideshowOrRandom "leics/" "$2"
|
||||
;;
|
||||
a)
|
||||
slideshowOrRandom "art/" $2
|
||||
slideshowOrRandom "art/" "$2"
|
||||
;;
|
||||
t) toggle
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue