Compare commits
No commits in common. "94602ebb32fb8683264cf2975026c835f72ec9e1" and "857a4f16b7f9341d15f63acc4ac82f6fa75a8b79" have entirely different histories.
94602ebb32
...
857a4f16b7
|
@ -37,11 +37,9 @@ return { -- Autocompletion
|
||||||
-- into multiple repos for maintenance purposes.
|
-- into multiple repos for maintenance purposes.
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
"hrsh7th/cmp-path",
|
"hrsh7th/cmp-path",
|
||||||
"onsails/lspkind.nvim",
|
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
-- See `:help cmp`
|
-- See `:help cmp`
|
||||||
local lspkind = require("lspkind")
|
|
||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
local luasnip = require("luasnip")
|
local luasnip = require("luasnip")
|
||||||
luasnip.config.setup({})
|
luasnip.config.setup({})
|
||||||
|
@ -117,40 +115,6 @@ return { -- Autocompletion
|
||||||
{ name = "luasnip" },
|
{ name = "luasnip" },
|
||||||
{ name = "path" },
|
{ 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,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,6 +58,12 @@ return {
|
||||||
-- VertSplit = { fg = "muted", bg = "muted" },
|
-- VertSplit = { fg = "muted", bg = "muted" },
|
||||||
Folded = { fg = "foam", bg = "highlight_med" },
|
Folded = { fg = "foam", bg = "highlight_med" },
|
||||||
CursorLine = { bg = "surface" },
|
CursorLine = { bg = "surface" },
|
||||||
|
|
||||||
|
ModesInsert = { bg = "gold" },
|
||||||
|
--cursor line
|
||||||
|
ModesInsertCursorLine = { bg = "overlay" },
|
||||||
|
ModesVisual = { bg = "foam" },
|
||||||
|
ModesVisualVisual = { bg = "pine" },
|
||||||
},
|
},
|
||||||
|
|
||||||
before_highlight = function(group, highlight, palette)
|
before_highlight = function(group, highlight, palette)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
bgsDirectory="${HOME}/bgs/"
|
bgsDirectory="${HOME}/bgs/"
|
||||||
slideshow() {
|
slideshow() {
|
||||||
gsettings set org.cinnamon.desktop.background.slideshow slideshow-enabled "${1}"
|
gsettings set org.cinnamon.desktop.background.slideshow slideshow-enabled ${1}
|
||||||
}
|
}
|
||||||
setDirectory() {
|
setDirectory() {
|
||||||
gsettings set org.cinnamon.desktop.background.slideshow image-source "directory:///${bgsDirectory}${1}"
|
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(){
|
chooseRandom(){
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
files=("${1}"*)
|
files=(${1}*)
|
||||||
length=$((${#files[@]}))
|
length=$((${#files[@]}))
|
||||||
echo "length: ${length}"
|
echo "length: ${length}"
|
||||||
randomIndex=$(($RANDOM % $length))
|
randomIndex=$(($RANDOM % $length))
|
||||||
|
@ -30,23 +30,23 @@ chooseRandom(){
|
||||||
setImage "${files[$randomIndex]}"
|
setImage "${files[$randomIndex]}"
|
||||||
}
|
}
|
||||||
slideshowOrRandom(){
|
slideshowOrRandom(){
|
||||||
if [ "$#" -gt 1 ]&&[ "$2" = r ]; then
|
if [ "$#" -gt 1 -a "$2" = r ]; then
|
||||||
slideshow false
|
slideshow false
|
||||||
chooseRandom "${bgsDirectory}${1}"
|
chooseRandom "${bgsDirectory}${1}"
|
||||||
else
|
else
|
||||||
slideshow true
|
slideshow true
|
||||||
setDirectory "${1}"
|
setDirectory ${1}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
case $1 in
|
case $1 in
|
||||||
c)
|
c)
|
||||||
slideshowOrRandom "chsck/" "$2"
|
slideshowOrRandom "chsck/" $2
|
||||||
;;
|
;;
|
||||||
l)
|
l)
|
||||||
slideshowOrRandom "leics/" "$2"
|
slideshowOrRandom "leics/" $2
|
||||||
;;
|
;;
|
||||||
a)
|
a)
|
||||||
slideshowOrRandom "art/" "$2"
|
slideshowOrRandom "art/" $2
|
||||||
;;
|
;;
|
||||||
t) toggle
|
t) toggle
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue