Update dotfiles

This commit is contained in:
hok7z 2023-03-12 22:09:11 +02:00
parent f102096743
commit b2f8c1ce2a
14 changed files with 448 additions and 407 deletions

View File

@ -1,23 +1,26 @@
if status is-interactive
alias ls="lsd"
alias nv="nvim"
alias ls="lsd"
alias v="vim"
alias nv="nvim"
alias gc="git clone"
alias gst="git status"
alias bat="bat -p"
alias la="lsd -la"
alias la="lsd -la"
alias dotfiles="git --git-dir=$HOME/repos/dotfiles --work-tree=$HOME/"
alias dotfiles="git --git-dir=/home/q/repos/dotfiles.git --work-tree=$HOME"
set -U fish_user_paths $HOME/bin $fish_user_paths
set -U fish_user_paths $HOME/bin $fish_user_paths
set -x PF_INFO "ascii title os kernel wm shell pkgs memory"
set -x PF_INFO "ascii title os kernel wm shell pkgs memory"
set -x TERM "xterm"
set srcdir "$HOME/.cache/"
set pkgdir "$HOME/.npm/"
alias npm="npm --cache $srcir/npm-cache"
set srcdir "$HOME/.cache/"
set pkgdir "$HOME/.npm/"
alias npm="npm --cache $srcir/npm-cache"
set fish_greeting
# Commands to run in interactive sessions can go here
set fish_greeting
# Commands to run in interactive sessions can go here
end

View File

@ -8,7 +8,7 @@
# title=foot
# locked-title=no
font=JetBrainsMono Nerd Font Mono:size=11
font=JetBrainsMono Nerd Font Mono:size=9
# font=monospace:size=8
# font-bold=<bold variant of regular font>
@ -70,27 +70,64 @@ alternate-scroll-mode=yes
[colors]
#alpha = 0.99
alpha = 0.95
background=141b1e
foreground=dadada
regular0=232a2d
regular1=e57474
regular2=8ccf7e
regular3=e5c76b
regular4=67b0e8
regular5=c47fd5
regular6=6cbfbf
regular7=b3b9b8
foreground = d8dee9
background = 2e3440
bright0=2d3437
bright1=ef7e7e
bright2=96d988
bright3=f4d67a
bright4=71baf2
bright5=ce89df
bright6=67cbe7
bright7=bdc3c2
# selection-foreground = d8dee9
# selection-background = 4c566a
regular0 = 3b4252
regular1 = bf616a
regular2 = a3be8c
regular3 = ebcb8b
regular4 = 81a1c1
regular5 = b48ead
regular6 = 88c0d0
regular7 = e5e9f0
bright0 = 4c566a
bright1 = bf616a
bright2 = a3be8c
bright3 = ebcb8b
bright4 = 81a1c1
bright5 = b48ead
bright6 = 8fbcbb
bright7 = eceff4
dim0 = 373e4d
dim1 = 94545d
dim2 = 809575
dim3 = b29e75
dim4 = 68809a
dim5 = 8c738c
dim6 = 6d96a5
dim7 = aeb3bb
#background=141b1e
#foreground=dadada
#regular0=232a2d
#regular1=e57474
#regular2=8ccf7e
#regular3=e5c76b
#regular4=67b0e8
#regular5=c47fd5
#regular6=6cbfbf
#regular7=b3b9b8
#bright0=2d3437
#bright1=ef7e7e
#bright2=96d988
#bright3=f4d67a
#bright4=71baf2
#bright5=ce89df
#bright6=67cbe7
#bright7=bdc3c2
## dimmed colors (see foot.ini(5) man page)
# dim0=<not set>

View File

@ -2,8 +2,8 @@
LocationMode=path-bar
ShowHidden=true
ShowSizeColumn=true
GeometryX=380
GeometryY=135
GeometryX=62
GeometryY=0
GeometryWidth=840
GeometryHeight=630
SortColumn=name

View File

@ -1,10 +1,10 @@
[Settings]
gtk-theme-name=Tokyonight-Dark-B
gtk-icon-theme-name=Papirus
gtk-theme-name=Nordic
gtk-icon-theme-name=Nordzy-dark
gtk-font-name=Cantarell 11
gtk-cursor-theme-name=Adwaita
gtk-cursor-theme-name=Nordzy-cursors-white
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR

View File

@ -45,10 +45,10 @@ general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 5
gaps_out = 10
border_size = 2
border_size = 3
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
col.inactive_border = rgba(595959aa)
col.active_border = rgb(88c0d0) 45deg
col.inactive_border = rgb(2e3440)
layout = dwindle
}
@ -141,10 +141,10 @@ bind = $mainMod ALT, J, togglesplit, # dwindle
binde= ,F2, exec, pactl set-sink-volume @DEFAULT_SINK@ -1%
binde= ,F3, exec, pactl set-sink-volume @DEFAULT_SINK@ +1%
bind = $mainMod, b, exec, foot -e bluetuith
bind = $mainMod, RETURN, exec, foot
bind = $mainMod, N, exec, nemo
bind = $mainMod, d, exec, wofi --show drun
bind = $mainMod, d, exec, wofi --show drun -I
bind = ,Print,exec,makescreenshot
# not forget install xdg-desktop-portal 1.14.6

View File

@ -1,6 +1,6 @@
preload = /home/q/Pictures/wallpapers/mountain.png
preload = /home/q/Pictures/wallpapers/nord/wallhaven-4glwwl_1920x1080.png
wallpaper = ,/home/q/Pictures/wallpapers/mountain.png
wallpaper = ,/home/q/Pictures/wallpapers/nord/wallhaven-4glwwl_1920x1080.png
#preload = /home/q/Pictures/wallpapers/catppuccin/tetris.png
#wallpaper = ,/home/q/Pictures/wallpapers/catppuccin/tetris.png

View File

@ -1,8 +1,8 @@
local core = {"options", "globals", "keybinds", "autocmds", "plugins"}
for _,source in ipairs(core) do
local ok, fault = pcall(require,'core.' .. source)
if not ok then
vim.notify("Failed to load " .. source .."\n\n" .. fault )
end
local ok, fault = pcall(require,'core.' .. source)
if not ok then
vim.notify("Failed to load " .. source .."\n\n" .. fault )
end
end

View File

@ -1,13 +1,13 @@
vim.api.nvim_create_autocmd({"WinEnter","BufEnter"},{
callback = function()
vim.opt.statusline = "%F"
end
callback = function()
vim.opt.statusline = "%F"
end
})
vim.api.nvim_create_autocmd({"BufEnter","BufWinEnter","WinEnter","CmdwinEnter"},{
callback = function()
if vim.fn.expand("%") == "NvimTree_1" then
vim.opt.statusline = " NvimTree"
end
end,
callback = function()
if vim.fn.expand("%") == "NvimTree_1" then
vim.opt.statusline = " NvimTree"
end
end,
})

View File

@ -1,11 +1,11 @@
_G.require_mod = function(mod)
local ok, result = pcall(require, mod)
local ok, result = pcall(require, mod)
if not ok then
vim.notify("Failed to load " .. mod, "error")
-- vim.pretty_print({plugin = mod, error = result})
return nil
end
if not ok then
vim.notify("Failed to load " .. mod, "error")
-- vim.pretty_print({plugin = mod, error = result})
return nil
end
return result
return result
end

View File

@ -2,30 +2,32 @@ local opt = vim.opt
local ok, notify = pcall(require, "notify")
if ok then
vim.notify = notify
vim.notify = notify
end
local ok, err = pcall(function()
vim.g.diagnostic_sings = {"", "", "", ""}
vim.g.diagnostic_sings = {"", "", "", ""}
-- vim.cmd('colorscheme catppuccin-macchiato')
-- vim.cmd('colorscheme aquarium')
vim.cmd('colorscheme everblush')
-- vim.cmd('colorscheme catppuccin-macchiato')
-- vim.cmd('colorscheme aquarium')
opt.termguicolors = true
vim.cmd('colorscheme nord')
end)
if not ok then
print(err)
print(err)
end
opt.encoding = "utf-8"
opt.swapfile = false
opt.number = true
opt.relativenumber = true
vim.g.mapleader = " "
vim.g.lsp_path = os.getenv("HOME") .. "/.local/share/nvim/mason/bin/"
vim.g.mapleader = ","
opt.list = true
opt.listchars = {tab = '| '}
@ -35,9 +37,7 @@ opt.splitright = true
opt.undofile = true
opt.tabstop = 4
opt.shiftwidth = 4
opt.tabstop = 2
opt.shiftwidth = 2
opt.expandtab = true
opt.mouse = "a"
vim.g.lsp_path = os.getenv("HOME") .. "/.local/share/nvim/mason/bin/"

View File

@ -1,261 +1,260 @@
local ok, packer = pcall(require,"packer")
if not ok then
vim.notify("Failed to load packer\n\n")
return
vim.notify("Failed to load packer\n\n")
return
end
vim.api.nvim_create_autocmd("BufWritePost", {
pattern = "*/core/plugins.lua",
callback = function(arg)
vim.cmd("source "..arg.file)
vim.cmd("PackerInstall")
end,
pattern = "*/core/plugins.lua",
callback = function(arg)
vim.cmd("source "..arg.file)
vim.cmd("PackerInstall")
end,
})
packer.startup{
function(use)
use {"wbthomason/packer.nvim"}
function(use)
use {"wbthomason/packer.nvim"}
use {
"lewis6991/impatient.nvim",
config = function() require('impatient') end
}
-- Colorchemes
-- use {"catppuccin/nvim", as = "catppuccin"}
-- use {"tiagovla/tokyodark.nvim"}
use {'Everblush/everblush.nvim',as = 'everblush'}
-- use {"frenzyexists/aquarium-vim"}
-- use {"rebelot/kanagawa.nvim"}
-- use {"projekt0n/github-nvim-theme"}
-- use {"Mofiqul/vscode.nvim"}
use {"dstein64/vim-startuptime"}
use {
"kyazdani42/nvim-tree.lua",
requires = { "kyazdani42/nvim-web-devicons" },
config = function() require("plugins.nvim-tree") end
}
use {
"rcarriga/nvim-notify",
config = function()
require("notify").setup({
on_open = function(win)
vim.api.nvim_win_set_config(win,{focusable = false})
end,
})
end,
}
use {
"lewis6991/gitsigns.nvim",
config = function() require("gitsigns").setup{keymaps = {}} end
}
use {
"akinsho/toggleterm.nvim", tag = 'v2.*',
config = function() require("toggleterm").setup() end
}
use {
"windwp/nvim-autopairs",
config = function() require("nvim-autopairs").setup() end
}
use {
"lukas-reineke/indent-blankline.nvim",
config = function()
require("indent_blankline").setup{
show_end_of_line = true,
space_char_blankline = " ",
}
end
}
use {
"numToStr/Comment.nvim",
config = function() require('Comment').setup() end
}
use {
"folke/todo-comments.nvim",
requires = "nvim-lua/plenary.nvim",
config = function() require("todo-comments").setup() end
}
use {
"nvim-treesitter/nvim-treesitter",
requires = {
"nvim-treesitter/playground",
"nvim-treesitter/nvim-treesitter-textobjects",
},
run = function() vim.cmd("TSUpdate") end,
config = function() require("plugins.treesitter") end
}
use {
"nvim-telescope/telescope.nvim",
requires = {"nvim-lua/plenary.nvim"},
config = function() require("plugins.telescope") end
}
-- Language Server Protocol
use {
"neovim/nvim-lspconfig",
requires = { "williamboman/mason.nvim", "williamboman/mason-lspconfig.nvim" },
config = function()
require("lsp")
require("mason").setup()
end
}
use {
"hrsh7th/nvim-cmp",
requires = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-path",
"hrsh7th/cmp-buffer",
"saadparwaiz1/cmp_luasnip",
"hrsh7th/cmp-calc",
"hrsh7th/cmp-emoji",
"hrsh7th/cmp-cmdline",
},
config = function() require("plugins.cmp") end
}
use {
"onsails/lspkind-nvim",
config = function()
local lspkind = require("lspkind")
lspkind.init{
mode = 'symbol_text',
preset = 'codicons',
symbol_map = {
Text = "",
Method = "",
Function = "",
Constructor = "",
Field = "",
Variable = "",
Class = "",
Interface = "",
Module = "",
Property = "",
Unit = "",
Value = "",
Enum = "",
Keyword = "",
Snippet = "",
Color = "",
File = "",
Reference = "",
Folder = "",
EnumMember = "",
Constant = "",
Struct = "",
Event = "",
Operator = "",
TypeParameter = ""
}
}
end
}
use {
"L3MON4D3/LuaSnip",
requires = {"rafamadriz/friendly-snippets"},
config = function() require("luasnip/loaders/from_vscode").lazy_load() end
}
use {
"jose-elias-alvarez/null-ls.nvim",
config = function() require("plugins.null-ls") end
}
use {
"SmiteshP/nvim-navic",
requires = {"neovim/nvim-lspconfig"},
config = function()
local navic = require("nvim-navic")
navic.setup {
highlight = false,
separator = " > ",
depth_limit = 0.01,
depth_limit_indicator = "..",
safe_output = true
}
end,
}
use {
"ray-x/lsp_signature.nvim",
config = function()
local lsp_signature = require("lsp_signature")
lsp_signature.setup{
hint_enable = false,
verbose = true
}
end
}
use {
"j-hui/fidget.nvim",
config = function() require("fidget").setup() end
}
-- Debug Adapter Protocol
use {
"mfussenegger/nvim-dap",
requires = {
"arywz11/DAPInstall.nvim",
"rcarriga/nvim-dap-ui"
},
config = function() require("plugins.dap") end,
}
end,
config = {
display = {
open_fn = function()
return require("packer.util").float{border = "rounded"}
end
}
use {
"lewis6991/impatient.nvim",
config = function() require('impatient') end
}
-- Colorchemes
use 'gbprod/nord.nvim'
-- use {"catppuccin/nvim", as = "catppuccin"}
-- use {"tiagovla/tokyodark.nvim"}
-- use {'Everblush/everblush.nvim',as = 'everblush'}
-- use {"frenzyexists/aquarium-vim"}
-- use {"rebelot/kanagawa.nvim"}
-- use {"projekt0n/github-nvim-theme"}
-- use {"Mofiqul/vscode.nvim"}
use {"dstein64/vim-startuptime"}
use {
"kyazdani42/nvim-tree.lua",
requires = { "kyazdani42/nvim-web-devicons" },
config = function() require("plugins.nvim-tree") end
}
use {
"rcarriga/nvim-notify",
config = function()
require("notify").setup({
on_open = function(win)
vim.api.nvim_win_set_config(win,{focusable = false})
end,
})
end,
}
use {
"lewis6991/gitsigns.nvim",
config = function() require("gitsigns").setup{keymaps = {}} end
}
use {
"akinsho/toggleterm.nvim", tag = 'v2.*',
config = function() require("toggleterm").setup() end
}
use {
"windwp/nvim-autopairs",
config = function() require("nvim-autopairs").setup() end
}
use {
"lukas-reineke/indent-blankline.nvim",
config = function()
require("indent_blankline").setup{
show_end_of_line = true,
space_char_blankline = " ",
}
end
}
use {
"numToStr/Comment.nvim",
config = function() require('Comment').setup() end
}
use {
"folke/todo-comments.nvim",
requires = "nvim-lua/plenary.nvim",
config = function() require("todo-comments").setup() end
}
use {
"nvim-treesitter/nvim-treesitter",
requires = {
"nvim-treesitter/playground",
"nvim-treesitter/nvim-treesitter-textobjects",
},
run = function() vim.cmd("TSUpdate") end,
config = function() require("plugins.treesitter") end
}
use {
"nvim-telescope/telescope.nvim",
requires = {"nvim-lua/plenary.nvim"},
config = function() require("plugins.telescope") end
}
-- Language Server Protocol
use {
"neovim/nvim-lspconfig",
requires = { "williamboman/mason.nvim", "williamboman/mason-lspconfig.nvim" },
config = function()
require("lsp")
require("mason").setup()
end
}
use {
"hrsh7th/nvim-cmp",
requires = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-path",
"hrsh7th/cmp-buffer",
"saadparwaiz1/cmp_luasnip",
"hrsh7th/cmp-calc",
"hrsh7th/cmp-emoji",
"hrsh7th/cmp-cmdline",
},
config = function() require("plugins.cmp") end
}
use {
"onsails/lspkind-nvim",
config = function()
local lspkind = require("lspkind")
lspkind.init{
mode = 'symbol_text',
preset = 'codicons',
symbol_map = {
Text = "",
Method = "",
Function = "",
Constructor = "",
Field = "",
Variable = "",
Class = "",
Interface = "",
Module = "",
Property = "",
Unit = "",
Value = "",
Enum = "",
Keyword = "",
Snippet = "",
Color = "",
File = "",
Reference = "",
Folder = "",
EnumMember = "",
Constant = "",
Struct = "",
Event = "",
Operator = "",
TypeParameter = ""
}
}
end
}
use {
"L3MON4D3/LuaSnip",
requires = {"rafamadriz/friendly-snippets"},
config = function() require("plugins.luasnip") end
}
use {
"jose-elias-alvarez/null-ls.nvim",
config = function() require("plugins.null-ls") end
}
use {
"SmiteshP/nvim-navic",
requires = {"neovim/nvim-lspconfig"},
config = function()
local navic = require("nvim-navic")
navic.setup {
highlight = false,
separator = " > ",
depth_limit = 0.01,
depth_limit_indicator = "..",
safe_output = true
}
end,
}
use {
"ray-x/lsp_signature.nvim",
config = function()
local lsp_signature = require("lsp_signature")
lsp_signature.setup{
hint_enable = false,
verbose = true
}
end
}
use {
"j-hui/fidget.nvim",
config = function() require("fidget").setup() end
}
-- Debug Adapter Protocol
use {
"mfussenegger/nvim-dap",
requires = {
"arywz11/DAPInstall.nvim",
"rcarriga/nvim-dap-ui"
},
config = function() require("plugins.dap") end,
}
end,
config = {
display = {
open_fn = function()
return require("packer.util").float{border = "rounded"}
end
}
}
}
local function bootstrap()
local fn = vim.fn
local packer_install_path =
fn.stdpath("data").."/site/pack/packer/opt/packer.nvim"
local not_installed = fn.empty(fn.glob(packer_install_path)) == 1
local fn = vim.fn
local packer_install_path =
fn.stdpath("data").."/site/pack/packer/opt/packer.nvim"
local not_installed = fn.empty(fn.glob(packer_install_path)) == 1
if not_installed then
print("`packer.nvim` is not installed, installing...")
local repo = "https://github.com/wbthomason/packer.nvim"
vim.cmd(("!git clone %s %s"):format(repo, packer_install_path))
end
if not_installed then
print("`packer.nvim` is not installed, installing...")
local repo = "https://github.com/wbthomason/packer.nvim"
vim.cmd(("!git clone %s %s"):format(repo, packer_install_path))
end
vim.cmd("packadd packer.nvim")
require("packer").startup {
load,
config = {
git = {clone_timeout = 240},
},
}
vim.cmd("packadd packer.nvim")
require("packer").startup {
load,
config = {
git = {clone_timeout = 240},
},
}
if not_installed then
vim.cmd("PackerSync")
end
if not_installed then
vim.cmd("PackerSync")
end
end
return bootstrap

View File

@ -1,74 +1,74 @@
local lsp = require_mod("lspconfig")
local mason_lsp = require_mod("mason-lspconfig")
local navic = require_mod("nvim-navic")
local sign = vim.fn.sign_define
local sign_name = {"Error","Warn","Info","Hint"}
-- Set lsp signs
for k, icon in pairs(vim.g.diagnostic_sings) do
sign("DiagnosticSign" .. sign_name[k],{text=icon,texthl="DiagnosticSign" .. sign_name[k]})
sign("DiagnosticSign" .. sign_name[k],{text=icon,texthl="DiagnosticSign" .. sign_name[k]})
end
-- Settings diagnostics
vim.diagnostic.config {
signs = true,
underline = true,
update_in_insert = false,
severity_sort = false,
signs = true,
underline = true,
update_in_insert = false,
severity_sort = false,
virtual_text = {prefix = 'x'},
float = {border = "rounded"},
virtual_text = {prefix = 'x'},
float = {border = "rounded"},
}
vim.g.lsp_handler = {
["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover,{border="rounded"}),
["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help,{border="rounded"})
["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover,{border="rounded"}),
["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help,{border="rounded"})
}
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
capabilities.textDocument.foldingRange = {
dynamicRegistration = false,
lineFoldingOnly = true,
dynamicRegistration = false,
lineFoldingOnly = true,
}
local navic = require("nvim-navic")
vim.g.lsp_capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
vim.g.lsp_on_attach = function(client,bufnr)
print("Attaching to:",client.name)
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr,...) end
local opts = {noremap = true,silent=true}
print("Attaching to:",client.name)
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr,...) end
local opts = {noremap = true,silent=true}
if client.server_capabilities.documentSymbolProvider then
navic.attach(client, bufnr)
end
if client.server_capabilities.documentSymbolProvider then
navic.attach(client, bufnr)
end
buf_set_keymap('n','gd','<cmd>lua vim.lsp.buf.definition()<CR>',opts)
buf_set_keymap('n','K', '<cmd>lua vim.lsp.buf.hover()<CR>',opts)
buf_set_keymap('n','[d','<cmd>lua vim.diagnostic.goto_prev()<CR>',opts)
buf_set_keymap('n',']d','<cmd>lua vim.diagnostic.goto_next()<CR>',opts)
buf_set_keymap('n','<leader>d','<cmd>lua vim.diagnostic.open_float({border="rounded"})<CR>',opts)
-- buf_set_keymap('n','<space>f','<cmd>lua vim.lsp.buf.formatting()<CR>',opts)
buf_set_keymap('n','gd','<cmd>lua vim.lsp.buf.definition()<CR>',opts)
buf_set_keymap('n','K', '<cmd>lua vim.lsp.buf.hover()<CR>',opts)
buf_set_keymap('n','[d','<cmd>lua vim.diagnostic.goto_prev()<CR>',opts)
buf_set_keymap('n',']d','<cmd>lua vim.diagnostic.goto_next()<CR>',opts)
buf_set_keymap('n','<leader>d','<cmd>lua vim.diagnostic.open_float({border="rounded"})<CR>',opts)
-- buf_set_keymap('n','<space>f','<cmd>lua vim.lsp.buf.formatting()<CR>',opts)
end
local servers = mason_lsp.get_installed_servers()
for _, server in ipairs(servers) do
local ok, result = pcall(require, "lsp.servers."..server)
if ok then
local lsp_server = lsp[server]
if lsp_server ~= nil then
local ok, err = pcall(lsp_server.setup, result)
if err ~= nil then
vim.pretty_print(err)
end
else
vim.pretty_print({server = server, result = result})
-- vim.notify("Missing server configuration for " .. server, "error")
end
local ok, result = pcall(require, "lsp.servers."..server)
if ok then
local lsp_server = lsp[server]
if lsp_server ~= nil then
local ok, err = pcall(lsp_server.setup, result)
if err ~= nil then
vim.pretty_print(err)
end
else
vim.pretty_print({server = server, result = result})
-- vim.notify("Missing server configuration for " .. server, "error")
end
end
end

View File

@ -1,52 +1,54 @@
local ok,cmp = pcall(require,"cmp")
if not ok then
vim.notify("Failed to load cmp\n\n")
return
vim.notify("Failed to load cmp\n\n")
return
end
cmp.setup {
mapping = {
["<Tab>"] = cmp.mapping.select_next_item(),
["<S-Tab>"] = cmp.mapping.select_prev_item(),
["<C-Space>"] = cmp.mapping.complete(),
["<CR>"] = cmp.mapping.confirm({select = false}),
},
mapping = {
["<Tab>"] = cmp.mapping.select_next_item(),
["<C-N>"] = cmp.mapping.select_next_item(),
["<S-Tab>"] = cmp.mapping.select_prev_item(),
["<C-P>"] = cmp.mapping.select_prev_item(),
["<C-Space>"] = cmp.mapping.complete(),
["<CR>"] = cmp.mapping.confirm({select = false}),
},
completion = {
autocomplete = true,
completeopt = "menu,menuone,noinsert",
winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,Search:None",
},
completion = {
autocomplete = true,
completeopt = "menu,menuone,noinsert",
winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,Search:None",
},
snippet = {
expand = function(args)
require('luasnip').lsp_expand(args.body)
end,
},
snippet = {
expand = function(args)
require('luasnip').lsp_expand(args.body)
end,
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered()
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered()
},
formatting = {
fields = { "kind", "abbr", "menu" },
format = function(entry, vim_item)
local kind = require("lspkind").cmp_format({mode = "symbol_text", maxwidth = 50})(entry, vim_item)
local strings = vim.split(kind.kind, "%s",{trimempty = true})
kind.kind = " " .. strings[1] .. " "
kind.menu = " (" .. strings[2] .. ")"
formatting = {
fields = { "kind", "abbr", "menu" },
format = function(entry, vim_item)
local kind = require("lspkind").cmp_format({mode = "symbol_text", maxwidth = 50})(entry, vim_item)
local strings = vim.split(kind.kind, "%s",{trimempty = true})
kind.kind = " " .. strings[1] .. " "
kind.menu = " (" .. strings[2] .. ")"
return kind
end
return kind
end
},
sources = {
{name = "nvim_lsp"},
{name = "luasnip"},
{name = "emoji"},
{name = "calc"},
},
},
sources = {
{ name = "nvim_lsp" },
{ name = "luasnip" },
{ name = "emoji" },
{ name = "calc" },
},
}

View File

@ -4,9 +4,9 @@ After=network-online.target
[Service]
Type=simple
EnvironmentFile=/home/q/.config/telegram-bot-api/config.env
EnvironmentFile=$HOME/.config/telegram-bot-api/config.env
WorkingDirectory=~
ExecStart=/home/q/bin/telegram-bot-api --api-id=${api_id} --api-hash=${api_hash} --local --http-stat-ip-address=${ip} --http-port=${port} --dir=/home/q/.config/telegram-bot-api/
ExecStart=telegram-bot-api --api-id=${api_id} --api-hash=${api_hash} --local --http-stat-ip-address=${ip} --http-port=${port} --dir=$HOME/.config/telegram-bot-api/
[Install]
WantedBy=multi-user.target