Before sway->hyprland
This commit is contained in:
parent
e8f291d953
commit
c6e4bab50f
|
@ -42,9 +42,7 @@ test -d ~/.tmux/pluginx/tpm || \
|
|||
l common/zellij $c/zellij
|
||||
l common/fish $c/fish
|
||||
l common/bash/rc $h/.bashrc
|
||||
l common/neovim $c/nvim
|
||||
l common/wezterm $c/wezterm
|
||||
l common/colors/vim $c/nvim/colors/base16-donokai.vim
|
||||
l common/weechat $h/.weechat
|
||||
l common/scim/rc $h/.scimrc
|
||||
l common/scim/lua $h/.scim/lua
|
||||
|
|
|
@ -6,6 +6,7 @@ IEx.configure(
|
|||
colors: [enabled: true],
|
||||
inspect: [
|
||||
pretty: true,
|
||||
printable_limit: :infinity,
|
||||
limit: :infinity
|
||||
],
|
||||
default_prompt:
|
||||
|
|
8
common/neovim/.gitignore
vendored
8
common/neovim/.gitignore
vendored
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
!/.gitignore
|
||||
!/init.vim
|
||||
!/init.lua
|
||||
!/ftplugin
|
||||
!/lua
|
||||
!/coc-settings.json
|
||||
!/colors
|
|
@ -1 +0,0 @@
|
|||
/home/daniel/.home/.config/lytedev-dotfiles/common/colors/vim
|
|
@ -1,141 +0,0 @@
|
|||
hi clear
|
||||
syntax reset
|
||||
|
||||
hi normal cterm=none ctermfg=7
|
||||
hi bold cterm=bold
|
||||
|
||||
hi statusline cterm=none ctermfg=7 ctermbg=234
|
||||
hi statuslinenc cterm=none ctermfg=234 ctermbg=0
|
||||
hi inactivebuffer cterm=none ctermbg=234 ctermfg=7
|
||||
hi activebuffer cterm=none ctermfg=0 ctermbg=4
|
||||
hi dirtybuffer cterm=none ctermfg=0 ctermbg=1
|
||||
hi activedirtybuffer cterm=none ctermfg=0 ctermbg=3
|
||||
hi pmenu cterm=none ctermfg=7 ctermbg=236
|
||||
hi pmenusel cterm=none ctermbg=4 ctermfg=0
|
||||
hi pmenusbar cterm=none ctermbg=236 ctermfg=240
|
||||
hi pmenuthumb cterm=none ctermbg=240 ctermfg=240
|
||||
hi linenr cterm=none ctermfg=240
|
||||
hi indentblanklinechar cterm=none ctermfg=236
|
||||
hi signcolumn cterm=none ctermfg=234 ctermbg=0
|
||||
hi matchparen cterm=none ctermbg=5 ctermfg=0
|
||||
hi search cterm=bold ctermbg=4
|
||||
hi incsearch cterm=bold ctermbg=4
|
||||
|
||||
hi todo cterm=none ctermfg=7 ctermbg=240
|
||||
hi comment cterm=none ctermfg=240
|
||||
hi keyword cterm=none ctermfg=7
|
||||
hi operator cterm=none ctermfg=7
|
||||
hi repeat cterm=none ctermfg=1
|
||||
hi type cterm=none ctermfg=3
|
||||
hi string cterm=none ctermfg=2
|
||||
hi noise cterm=none ctermfg=5 ctermbg=0
|
||||
hi statement cterm=none ctermfg=1 ctermbg=0
|
||||
hi conditional cterm=none ctermfg=1 ctermbg=0
|
||||
hi structure cterm=none ctermfg=4 ctermbg=0
|
||||
hi special cterm=none ctermfg=5 ctermbg=0
|
||||
hi preproc cterm=none ctermfg=1 ctermbg=0
|
||||
hi identifier cterm=none ctermfg=4 ctermbg=0
|
||||
hi constant cterm=none ctermfg=1
|
||||
hi nontext ctermfg=0 ctermbg=0
|
||||
hi diffoldfile cterm=none ctermfg=1
|
||||
hi diffremoved cterm=none ctermfg=1
|
||||
hi diffadded cterm=none ctermfg=2
|
||||
|
||||
" TODO: diagnostics popups, telescope dialogs
|
||||
|
||||
hi LspDiagnosticsSignWarning cterm=none ctermfg=1 ctermbg=0
|
||||
hi lspdiagnosticsvirtualtextwarning cterm=none ctermfg=1 ctermbg=0
|
||||
|
||||
hi TelescopeBorder ctermfg=234
|
||||
hi TelescopePromptBorder ctermfg=234
|
||||
hi TelescopeResultsBorder ctermfg=234
|
||||
hi TelescopePreviewBorder ctermfg=234
|
||||
|
||||
hi TelescopeSelection ctermbg=236 ctermfg=7
|
||||
hi TelescopeSelectionCaret ctermfg=7
|
||||
hi TelescopeMultiSelection ctermfg=7
|
||||
hi TelescopeNormal ctermfg=7
|
||||
|
||||
hi TelescopeMatching ctermfg=0 ctermbg=4
|
||||
hi TelescopePromptPrefix guifg=red
|
||||
|
||||
" vim tui elements
|
||||
" call <sid>hi('Debug', s:gui08, '', s:cterm08, '', '', '')
|
||||
" call <sid>hi('Directory', s:gui0D, '', s:cterm0D, '', '', '')
|
||||
" call <sid>hi('Error', s:gui00, s:gui08, s:cterm00, s:cterm08, '', '')
|
||||
" call <sid>hi('ErrorMsg', s:gui08, s:gui00, s:cterm08, s:cterm00, '', '')
|
||||
" call <sid>hi('Exception', s:gui08, '', s:cterm08, '', '', '')
|
||||
" call <sid>hi('FoldColumn', s:gui0C, s:gui01, s:cterm0C, s:cterm01, '', '')
|
||||
" call <sid>hi('Folded', s:gui03, s:gui01, s:cterm03, s:cterm01, '', '')
|
||||
" call <sid>hi('IncSearch', s:gui01, s:gui09, s:cterm01, s:cterm09, 'none', '')
|
||||
" call <sid>hi('Italic', '', '', '', '', 'none', '')
|
||||
" call <sid>hi('Macro', s:gui08, '', s:cterm08, '', '', '')
|
||||
" call <sid>hi('MatchParen', s:gui00, s:gui03, s:cterm00, s:cterm03, '', '')
|
||||
" call <sid>hi('ModeMsg', s:gui0B, '', s:cterm0B, '', '', '')
|
||||
" call <sid>hi('MoreMsg', s:gui0B, '', s:cterm0B, '', '', '')
|
||||
" call <sid>hi('Question', s:gui0D, '', s:cterm0D, '', '', '')
|
||||
" call <sid>hi('Search', s:gui03, s:gui0A, s:cterm03, s:cterm0A, '', '')
|
||||
" call <sid>hi('SpecialKey', s:gui03, '', s:cterm03, '', '', '')
|
||||
" call <sid>hi('TooLong', s:gui08, '', s:cterm08, '', '', '')
|
||||
" call <sid>hi('Underlined', s:gui08, '', s:cterm08, '', '', '')
|
||||
" call <sid>hi('Visual', '', s:gui02, '', s:cterm02, '', '')
|
||||
" call <sid>hi('VisualNOS', s:gui08, '', s:cterm08, '', '', '')
|
||||
" call <sid>hi('WarningMsg', s:gui08, '', s:cterm08, '', '', '')
|
||||
" call <sid>hi('WildMenu', s:gui08, s:gui0A, s:cterm08, '', '', '')
|
||||
" call <sid>hi('Title', s:gui0D, '', s:cterm0D, '', 'none', '')
|
||||
" call <sid>hi('Conceal', s:gui0D, s:gui00, s:cterm0D, s:cterm00, '', '')
|
||||
" call <sid>hi('Cursor', s:gui00, s:gui05, s:cterm00, s:cterm05, '', '')
|
||||
" call <sid>hi('NonText', s:gui03, '', s:cterm03, '', '', '')
|
||||
" call <sid>hi('Normal', s:gui05, s:gui00, s:cterm05, s:cterm00, '', '')
|
||||
" call <sid>hi('VertSplit', s:gui02, s:gui02, s:cterm02, s:cterm02, 'none', '')
|
||||
" call <sid>hi('ColorColumn', '', s:gui01, '', s:cterm01, 'none', '')
|
||||
" call <sid>hi('CursorColumn', '', s:gui01, '', s:cterm01, 'none', '')
|
||||
" call <sid>hi('CursorLine', '', s:gui01, '', s:cterm01, 'none', '')
|
||||
" call <sid>hi('CursorLineNr', s:gui03, s:gui01, s:cterm03, s:cterm01, '', '')
|
||||
" call <sid>hi('PMenu', s:gui04, s:gui01, s:cterm04, s:cterm01, 'none', '')
|
||||
" call <sid>hi('PMenuSel', s:gui01, s:gui04, s:cterm01, s:cterm04, '', '')
|
||||
" call <sid>hi('TabLine', s:gui03, s:gui01, s:cterm03, s:cterm01, 'none', '')
|
||||
" call <sid>hi('TabLineFill', s:gui03, s:gui01, s:cterm03, s:cterm01, 'none', '')
|
||||
" call <sid>hi('TabLineSel', s:gui0B, s:gui01, s:cterm0B, s:cterm01, 'none', '')
|
||||
|
||||
" standard syntax
|
||||
" call <sid>hi('Boolean', s:gui09, '', s:cterm09, '', '', '')
|
||||
" call <sid>hi('Character', s:gui08, '', s:cterm08, '', '', '')
|
||||
" call <sid>hi('Comment', s:gui03, '', s:cterm03, '', '', '')
|
||||
" call <sid>hi('Conditional', s:gui0E, '', s:cterm0E, '', '', '')
|
||||
" call <sid>hi('Constant', s:gui09, '', s:cterm09, '', '', '')
|
||||
" call <sid>hi('Define', s:gui0E, '', s:cterm0E, '', 'none', '')
|
||||
" call <sid>hi('Delimiter', s:gui0F, '', s:cterm0F, '', '', '')
|
||||
" call <sid>hi('Float', s:gui09, '', s:cterm09, '', '', '')
|
||||
" call <sid>hi('Function', s:gui0D, '', s:cterm0D, '', '', '')
|
||||
" call <sid>hi('Identifier', s:gui08, '', s:cterm08, '', 'none', '')
|
||||
" call <sid>hi('Include', s:gui0D, '', s:cterm0D, '', '', '')
|
||||
" call <sid>hi('Keyword', s:gui0E, '', s:cterm0E, '', '', '')
|
||||
" call <sid>hi('Label', s:gui0A, '', s:cterm0A, '', '', '')
|
||||
" call <sid>hi('Number', s:gui09, '', s:cterm09, '', '', '')
|
||||
" call <sid>hi('Operator', s:gui05, '', s:cterm05, '', 'none', '')
|
||||
" call <sid>hi('PreProc', s:gui0A, '', s:cterm0A, '', '', '')
|
||||
" call <sid>hi('Repeat', s:gui0A, '', s:cterm0A, '', '', '')
|
||||
" call <sid>hi('Special', s:gui0C, '', s:cterm0C, '', '', '')
|
||||
" call <sid>hi('SpecialChar', s:gui0F, '', s:cterm0F, '', '', '')
|
||||
" call <sid>hi('Statement', s:gui08, '', s:cterm08, '', '', '')
|
||||
" call <sid>hi('StorageClass', s:gui0A, '', s:cterm0A, '', '', '')
|
||||
" call <sid>hi('String', s:gui0B, '', s:cterm0B, '', '', '')
|
||||
" call <sid>hi('Structure', s:gui0E, '', s:cterm0E, '', '', '')
|
||||
" call <sid>hi('Tag', s:gui0A, '', s:cterm0A, '', '', '')
|
||||
" call <sid>hi('Todo', s:gui0A, s:gui01, s:cterm0A, s:cterm01, '', '')
|
||||
" call <sid>hi('Type', s:gui0A, '', s:cterm0A, '', 'none', '')
|
||||
" call <sid>hi('Typedef', s:gui0A, '', s:cterm0A, '', '', '')
|
||||
" call <sid>hi('DiffAdd', s:gui0B, s:gui01, s:cterm0B, s:cterm01, '', '')
|
||||
" call <sid>hi('DiffChange', s:gui03, s:gui01, s:cterm03, s:cterm01, '', '')
|
||||
" call <sid>hi('DiffDelete', s:gui08, s:gui01, s:cterm08, s:cterm01, '', '')
|
||||
" call <sid>hi('DiffText', s:gui0D, s:gui01, s:cterm0D, s:cterm01, '', '')
|
||||
" call <sid>hi('DiffAdded', s:gui0B, s:gui00, s:cterm0B, s:cterm00, '', '')
|
||||
" call <sid>hi('DiffFile', s:gui08, s:gui00, s:cterm08, s:cterm00, '', '')
|
||||
" call <sid>hi('DiffNewFile', s:gui0B, s:gui00, s:cterm0B, s:cterm00, '', '')
|
||||
" call <sid>hi('DiffLine', s:gui0D, s:gui00, s:cterm0D, s:cterm00, '', '')
|
||||
" call <sid>hi('DiffRemoved', s:gui08, s:gui00, s:cterm08, s:cterm00, '', '')
|
||||
" call <sid>hi('SpellBad', '', s:gui00, '', s:cterm00, 'undercurl', s:gui08)
|
||||
" call <sid>hi('SpellLocal', '', s:gui00, '', s:cterm00, 'undercurl', s:gui0C)
|
||||
" call <sid>hi('SpellCap', '', s:gui00, '', s:cterm00, 'undercurl', s:gui0D)
|
||||
" call <sid>hi('SpellRare', '', s:gui00, '', s:cterm00, 'undercurl', s:gui0E)
|
|
@ -1,583 +0,0 @@
|
|||
vim.g.vimdir = os.getenv('XDG_CONFIG_HOME') .. '/nvim'
|
||||
|
||||
-- ensure our plugin manager plugin is installed
|
||||
local packer_install_path = vim.fn.stdpath 'data' .. '/site/pack/packer/start/packer.nvim'
|
||||
if #vim.fn.glob(packer_install_path) == 0 then
|
||||
vim.fn.system { 'git', 'clone', 'https://github.com/wbthomason/packer.nvim', packer_install_path }
|
||||
vim.cmd 'packadd packer.nvim'
|
||||
end
|
||||
|
||||
local has_words_before = function()
|
||||
local line, col = 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
|
||||
|
||||
local packer = require 'packer'
|
||||
|
||||
packer.startup(function()
|
||||
local plugins = {
|
||||
'wbthomason/packer.nvim', -- neovim plugin manager
|
||||
|
||||
'vim-scripts/LargeFile', -- degrade gracefully with large files
|
||||
'tpope/vim-repeat', -- enable repeat for plugin maps
|
||||
'tpope/vim-sleuth', -- use whatever whitespace is in the file
|
||||
'editorconfig/editorconfig-vim', -- handle .editorconfig files
|
||||
'christoomey/vim-tmux-navigator', -- navigate vim splits and tmux panes fluidly
|
||||
'machakann/vim-sandwich', -- edit surrounding characters
|
||||
'michaeljsmith/vim-indent-object', -- adds indent-level text objects
|
||||
-- 'wellle/targets.vim', -- add many other text objects
|
||||
'bkad/CamelCaseMotion', -- invaluable motions for properly operating on various casings
|
||||
|
||||
{
|
||||
-- session management
|
||||
'olimorris/persisted.nvim',
|
||||
config = function()
|
||||
local should_autoload = #vim.v.argv == 1
|
||||
require 'persisted'.setup {
|
||||
autoload = should_autoload,
|
||||
autosave = should_autoload,
|
||||
}
|
||||
end
|
||||
},
|
||||
{
|
||||
-- toggle comments
|
||||
'terrortylor/nvim-comment',
|
||||
config = function()
|
||||
require 'nvim_comment'.setup()
|
||||
end
|
||||
},
|
||||
{
|
||||
-- fuzzy finder
|
||||
'nvim-telescope/telescope.nvim',
|
||||
requires = {
|
||||
'nvim-lua/popup.nvim',
|
||||
'nvim-lua/plenary.nvim',
|
||||
}
|
||||
},
|
||||
{
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
run = 'make',
|
||||
},
|
||||
{
|
||||
'tzachar/cmp-fuzzy-path',
|
||||
requires = { 'hrsh7th/nvim-cmp', 'tzachar/fuzzy.nvim' },
|
||||
},
|
||||
|
||||
-- TODO: add keymap <leader>ig for toggling these
|
||||
'lukas-reineke/indent-blankline.nvim', -- indentation guide lines
|
||||
'L3MON4D3/LuaSnip',
|
||||
|
||||
{
|
||||
-- completion engine
|
||||
'hrsh7th/nvim-cmp',
|
||||
config = function()
|
||||
local cmp = require 'cmp'
|
||||
local luasnip = require 'luasnip'
|
||||
|
||||
local prev_item = function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end
|
||||
|
||||
local next_item = function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end
|
||||
|
||||
cmp.setup {
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
},
|
||||
mapping = {
|
||||
['<C-b>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
|
||||
['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }),
|
||||
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
|
||||
-- ['<C-y>'] = cmp.config.n
|
||||
['<C-e>'] = cmp.mapping {
|
||||
i = cmp.mapping.close,
|
||||
c = cmp.mapping.close,
|
||||
},
|
||||
['<CR>'] = cmp.mapping.confirm { select = false },
|
||||
-- ["<Tab>"] = cmp.mapping(next_item, { "i", "s" }),
|
||||
-- ["<S-Tab>"] = cmp.mapping(prev_item, { "i", "s" }),
|
||||
['<C-n>'] = cmp.mapping(next_item, { "i", "s" }),
|
||||
['<C-p>'] = cmp.mapping(prev_item, { "i", "s" }),
|
||||
},
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'nvim_lsp_signature_help' },
|
||||
{ name = 'luasnip' },
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
{ name = 'path' },
|
||||
{ name = 'fuzzy_path' },
|
||||
}),
|
||||
formatting = {
|
||||
format = require("lspkind").cmp_format {
|
||||
with_text = true,
|
||||
menu = {
|
||||
nvim_lsp = "[LSP]",
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
cmp.setup.cmdline('/', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = 'buffer' },
|
||||
{ name = 'fuzzy_path' },
|
||||
}
|
||||
})
|
||||
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
})
|
||||
})
|
||||
end,
|
||||
},
|
||||
'neovim/nvim-lspconfig', -- language server configuration helper
|
||||
'williamboman/nvim-lsp-installer', -- plugin containing installation commands for many language servers
|
||||
'hrsh7th/cmp-nvim-lsp-signature-help',
|
||||
'hrsh7th/cmp-nvim-lsp', -- add lsp to completion engine
|
||||
'hrsh7th/cmp-buffer', -- add buffer information to completion engine
|
||||
'hrsh7th/cmp-path', -- add filesystem information to complete enging
|
||||
'hrsh7th/cmp-cmdline', -- add completion for vim commands
|
||||
'onsails/lspkind-nvim',
|
||||
'simrat39/symbols-outline.nvim',
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
-- TODO: automate this installation process of :COQdeps<cr>:COQnow<cr>
|
||||
-- {'ms-jpq/coq_nvim', branch = 'coq'},
|
||||
-- {'ms-jpq/coq.thirdparty', branch = '3p'},
|
||||
{
|
||||
-- syntax highlighting and indentation
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
run = ':TSUpdate',
|
||||
config = function()
|
||||
require 'nvim-treesitter.configs'.setup {
|
||||
ensure_installed = "all",
|
||||
sync_install = false,
|
||||
ignore_install = { "phpdoc" },
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = {},
|
||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||
-- Instead of true it can also be a list of languages
|
||||
-- additional_vim_regex_highlighting = false,
|
||||
},
|
||||
}
|
||||
end
|
||||
},
|
||||
'lukas-reineke/lsp-format.nvim',
|
||||
}
|
||||
for _, plugin in pairs(plugins) do packer.use(plugin) end
|
||||
end)
|
||||
|
||||
local globals = {
|
||||
mapleader = ' ',
|
||||
maplocalleader = ' ',
|
||||
-- skipview_files = { 'COMMIT_EDITMSG' },
|
||||
indent_blankline_char = '▏',
|
||||
indent_blankline_filetype_exclude = { 'help', 'packer' },
|
||||
indent_blankline_buftype_exclude = { 'terminal', 'nofile' },
|
||||
indent_blankline_char_highlight = 'LineNr',
|
||||
}
|
||||
for k, v in pairs(globals) do vim.g[k] = v end
|
||||
|
||||
local options = {
|
||||
clipboard = 'unnamedplus',
|
||||
inccommand = 'nosplit',
|
||||
tabstop = 2,
|
||||
softtabstop = 2,
|
||||
shiftwidth = 2,
|
||||
smartindent = true,
|
||||
list = true,
|
||||
listchars = 'trail:·,tab: ',
|
||||
linebreak = true,
|
||||
formatoptions = 'crql1jn',
|
||||
synmaxcol = 200,
|
||||
lazyredraw = true,
|
||||
scrolloff = 8,
|
||||
sidescrolloff = 15,
|
||||
mouse = 'a',
|
||||
splitright = true,
|
||||
splitbelow = true,
|
||||
errorbells = false,
|
||||
visualbell = true,
|
||||
backup = false,
|
||||
writebackup = false,
|
||||
swapfile = false,
|
||||
timeout = true,
|
||||
timeoutlen = 150,
|
||||
hidden = true,
|
||||
shortmess = 'filnxToOFIac',
|
||||
history = 1000,
|
||||
undofile = true,
|
||||
undodir = vim.fn.stdpath 'data' .. '/undo',
|
||||
undolevels = 1000,
|
||||
undoreload = 1000,
|
||||
spellfile = vim.fn.stdpath 'data' .. '/spell/en.utf-8.add',
|
||||
ignorecase = true,
|
||||
smartcase = true,
|
||||
incsearch = true,
|
||||
wrapscan = true,
|
||||
hlsearch = true,
|
||||
foldmethod = 'syntax',
|
||||
foldlevel = 99,
|
||||
foldnestmax = 10,
|
||||
foldlevelstart = 99,
|
||||
autowrite = false,
|
||||
autochdir = false,
|
||||
autoread = true,
|
||||
modeline = false,
|
||||
showmode = false,
|
||||
showcmd = false,
|
||||
laststatus = 2,
|
||||
ruler = false,
|
||||
number = true,
|
||||
-- cmdheight = 0, -- TODO: coming soon!
|
||||
}
|
||||
for k, v in pairs(options) do
|
||||
vim.o[k] = v
|
||||
end
|
||||
|
||||
vim.api.nvim_command 'colorscheme donokai'
|
||||
|
||||
function SynGroup()
|
||||
local s = vim.fn.synID(vim.fn.line('.'), vim.fn.col('.'), 1)
|
||||
-- TODO: instead of printing, put it in a popup? virtual text?
|
||||
print(s .. ': ' .. vim.fn.synIDattr(s, 'name') .. ' -> ' .. vim.fn.synIDattr(vim.fn.synIDtrans(s), 'name'))
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
vim.highlight.on_yank { higroup = 'Search', timeout = 200 }
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
vim.lsp.buf.formatting_seq_sync()
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "gitcommit",
|
||||
callback = function()
|
||||
vim.cmd 'startinsert'
|
||||
end,
|
||||
})
|
||||
|
||||
vim.cmd 'command! W write'
|
||||
|
||||
function NeatFoldText()
|
||||
-- TODO: finish this!
|
||||
-- local lines_count = vim.foldend - vim.foldstart + 1
|
||||
-- local foldchar = vim.fn.matchstr(vim.fillchars, 'fold:\\zs.')
|
||||
-- local foldtextstart = vim.fn.strpart('^' . repeat(foldchar, v:foldlevel*2) . line, 0, (winwidth(0)*2)/3)
|
||||
-- let foldtextend = printf("%s %".(winwidth(0)-20)."dL", foldtextstart, getline(v:foldstart), lines_count)
|
||||
-- let foldtextlength = strlen(substitute(foldtextstart . foldtextend, '.', 'x', 'g')) + &foldcolumn
|
||||
-- return printf("%s%d", substitute(getline(v:foldstart), "^.", ">"), lines_count)
|
||||
end
|
||||
|
||||
-- set foldtext=NeatFoldText()
|
||||
|
||||
for _, keys in ipairs { 'jj', 'jJ', 'Jj', 'JJ', 'jk', 'jK', 'Jk', 'JK' } do
|
||||
vim.api.nvim_set_keymap('i', keys, '<Esc>', {})
|
||||
end
|
||||
|
||||
local m = {
|
||||
s = { silent = true },
|
||||
n = { noremap = true },
|
||||
sn = { silent = true, noremap = true },
|
||||
}
|
||||
local keymap = {
|
||||
n = {
|
||||
['<leader>/'] = { ':let @/ = ""<cr>:<BACKSPACE>', m.s },
|
||||
|
||||
['<leader>r'] = { ':luafile ' .. vim.g.vimdir .. '/init.lua<cr>:echo \'Reloaded init.lua\'<cr>', m.s },
|
||||
['<leader>gv'] = { ':e ' .. vim.g.vimdir .. '/init.lua<cr>', m.s },
|
||||
|
||||
['<leader>w'] = { ':bd<cr>', m.s },
|
||||
['<leader>h'] = { ':b#<cr>', m.s },
|
||||
['<leader>k'] = { ':bnext<cr>', m.s },
|
||||
['<leader>j'] = { ':bprevious<cr>', m.s },
|
||||
|
||||
['<leader>s'] = "<cmd>SessionToggle<cr><cmd>echo 'Persisting Session: ' .. g:persisting .. ' (' .. getcwd() .. ')'<cr>",
|
||||
['<leader>S'] = "<cmd>SessionSave<cr><cmd>echo 'Saved Session: ' .. getcwd()<cr>",
|
||||
['<leader>l'] = "<cmd>SessionLoad<cr><cmd>echo 'Loaded Session: ' .. getcwd()<cr>",
|
||||
['<leader>L'] = "<cmd>SessionLoadLast<cr><cmd>echo 'Loaded Last Session: ' .. getcwd()<cr>",
|
||||
['<leader>d'] = "<cmd>SessionDelete<cr><cmd>echo 'Deleted Session for cwd: ' .. getcwd()<cr>",
|
||||
|
||||
['<leader>t'] = '<cmd>Telescope help_tags<cr>',
|
||||
|
||||
['<leader>m'] = '<cmd>lua SynGroup()<cr>',
|
||||
|
||||
['<c-q>'] = ':qa<cr>',
|
||||
['<c-x>'] = ':x<cr>',
|
||||
|
||||
['<c-p>'] = '<cmd>Telescope git_files<cr>',
|
||||
['<c-g>'] = '<cmd>Telescope live_grep<cr>',
|
||||
['<c-b>'] = '<cmd>Telescope buffers<cr>',
|
||||
|
||||
['<c-h>'] = ':TmuxNavigateLeft<cr>',
|
||||
['<c-j>'] = ':TmuxNavigateDown<cr>',
|
||||
['<c-k>'] = ':TmuxNavigateUp<cr>',
|
||||
['<c-l>'] = ':TmuxNavigateRight<cr>',
|
||||
|
||||
['<expr> n'] = "'Nn'[v:searchforward]",
|
||||
['<expr> N'] = "'nN'[v:searchforward]",
|
||||
},
|
||||
|
||||
-- terminal bindings
|
||||
t = {},
|
||||
|
||||
[''] = {
|
||||
['<space>'] = { '<nop>', m.sn },
|
||||
|
||||
-- remove trailing whitespace
|
||||
['<f3>'] = 'mw:%s/\\s\\+$//<cr>:let @/ = ""<cr>\'w',
|
||||
['<leader>gs'] = ':setlocal spell!<cr>',
|
||||
[',w'] = { '<Plug>CamelCaseMotion_w', m.s },
|
||||
[',b'] = { '<Plug>CamelCaseMotion_b', m.s },
|
||||
[',e'] = { '<Plug>CamelCaseMotion_e', m.s },
|
||||
[',ge'] = { '<Plug>CamelCaseMotion_ge', m.s },
|
||||
},
|
||||
o = {
|
||||
['ib'] = { '<Plug>CamelCaseMotion_ib', m.s },
|
||||
['ie'] = { '<Plug>CamelCaseMotion_ie', m.s },
|
||||
},
|
||||
x = {
|
||||
['<'] = '<gv',
|
||||
['>'] = '>gv',
|
||||
['ib'] = { '<Plug>CamelCaseMotion_ib', m.s },
|
||||
['ie'] = { '<Plug>CamelCaseMotion_ie', m.s },
|
||||
},
|
||||
i = {
|
||||
['<c-q>'] = '<esc><c-q>',
|
||||
['<c-x>'] = '<Esc>:x<cr>',
|
||||
},
|
||||
}
|
||||
for mode, mappings in pairs(keymap) do
|
||||
for key, bind in pairs(mappings) do
|
||||
if type(bind) == 'table' then
|
||||
vim.api.nvim_set_keymap(mode, key, bind[1], bind[2])
|
||||
else
|
||||
vim.api.nvim_set_keymap(mode, key, bind, {})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local status_line_max_length = 5
|
||||
|
||||
-- TODO: only update this portion when needed instead of every render?
|
||||
local status_line_buffer_by_num = function(bufnum)
|
||||
local is_active = false
|
||||
local bufinfo = vim.fn.getbufinfo(bufnum)[1]
|
||||
local prefix = ' %#InactiveBuffer#'
|
||||
local suffix = '%* '
|
||||
|
||||
if bufinfo.changed == 1 then
|
||||
prefix = '%#DirtyBuffer# '
|
||||
suffix = ' %*'
|
||||
end
|
||||
|
||||
local windex = vim.fn.index(bufinfo.windows, vim.g.statusline_winid)
|
||||
if bufinfo.hidden and windex >= 0 then
|
||||
is_active = true
|
||||
prefix = '%#ActiveBuffer# '
|
||||
suffix = ' %*'
|
||||
if bufinfo.changed == 1 then
|
||||
prefix = '%#ActiveDirtyBuffer# *'
|
||||
suffix = ' %*'
|
||||
end
|
||||
end
|
||||
|
||||
return (prefix .. vim.fn.fnamemodify(vim.fn.bufname(bufnum), ':t') .. suffix), is_active
|
||||
end
|
||||
|
||||
local status_line_buffers = function()
|
||||
local active_index = -1
|
||||
local acc = {}
|
||||
for _, bufnum in ipairs(vim.api.nvim_list_bufs()) do
|
||||
local bufinfo = vim.fn.getbufinfo(bufnum)[1]
|
||||
if bufinfo.listed ~= 0 then
|
||||
local entry, is_active = status_line_buffer_by_num(bufnum)
|
||||
table.insert(acc, entry)
|
||||
if is_active then
|
||||
active_index = #acc
|
||||
end
|
||||
end
|
||||
end
|
||||
if active_index >= 0 then
|
||||
local offset = status_line_max_length / 2
|
||||
local min_buf_num = math.max(0, (active_index - offset))
|
||||
local max_buf_num = math.min(#acc - 1, min_buf_num + status_line_max_length - 1)
|
||||
min_buf_num = math.max(0, max_buf_num - status_line_max_length + 1)
|
||||
local buflist = table.concat({ unpack(acc, min_buf_num + 1, max_buf_num + 1) }, '')
|
||||
local prefix = ''
|
||||
local suffix = ''
|
||||
if min_buf_num > 0 then
|
||||
prefix = '< '
|
||||
end
|
||||
if max_buf_num < (#acc - 1) then
|
||||
suffix = ' >'
|
||||
end
|
||||
return prefix .. buflist .. suffix
|
||||
else
|
||||
local suffix = ''
|
||||
if #acc - 1 > status_line_max_length then
|
||||
suffix = ' >'
|
||||
end
|
||||
local buflist = table.concat({ unpack(acc, 1, math.min(#acc, status_line_max_length)) }, '')
|
||||
return buflist .. suffix .. active_index
|
||||
end
|
||||
end
|
||||
|
||||
local whitespace = function()
|
||||
local result = ""
|
||||
if vim.o.expandtab == true then
|
||||
result = result .. vim.o.shiftwidth .. "S"
|
||||
else
|
||||
result = result .. vim.o.tabstop .. "T"
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
function StatusLine()
|
||||
return status_line_buffers() .. '%*%=%{&filetype} %l;%c (%p%%/%L) ' .. whitespace()
|
||||
end
|
||||
|
||||
vim.o.statusline = '%!v:lua.StatusLine()'
|
||||
|
||||
local lsp = require 'lspconfig'
|
||||
-- local coq = require'coq'
|
||||
|
||||
local lsp_format = require 'lsp-format'
|
||||
|
||||
local on_attach = function(client, bufnr)
|
||||
lsp_format.on_attach(client)
|
||||
|
||||
local lsp_mappings = {
|
||||
['n'] = {
|
||||
['<leader>e'] = 'vim.diagnostic.open_float()',
|
||||
['<C-a>'] = 'vim.lsp.buf.signature_help()',
|
||||
['gi'] = 'vim.lsp.buf.implementation()',
|
||||
['K'] = 'vim.lsp.buf.hover()',
|
||||
['gd'] = 'vim.lsp.buf.definition()',
|
||||
['gD'] = 'vim.lsp.buf.declaration()',
|
||||
['g['] = 'vim.diagnostic.goto_prev()',
|
||||
['g]'] = 'vim.diagnostic.goto_next()',
|
||||
['<space>wa'] = 'vim.lsp.buf.add_workspace_folder()',
|
||||
['<space>wr'] = 'vim.lsp.buf.remove_workspace_folder()',
|
||||
['<space>wl'] = 'print(vim.inspect(vim.lsp.buf.list_workspace_folders()))',
|
||||
['<space>D'] = 'vim.lsp.buf.type_definition()',
|
||||
['<space>rn'] = 'vim.lsp.buf.rename()',
|
||||
['<space>ca'] = 'vim.lsp.buf.code_action()',
|
||||
['gr'] = 'vim.lsp.buf.references()',
|
||||
['<space>f'] = 'vim.lsp.buf.formatting_seq_sync()',
|
||||
}
|
||||
}
|
||||
|
||||
for mode, mappings in pairs(lsp_mappings) do
|
||||
for keys, script in pairs(mappings) do
|
||||
vim.api.nvim_buf_set_keymap(bufnr, mode, keys, '<cmd>lua ' .. script .. '<cr>', m.sn)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
|
||||
set els_path ~/.local/share/nvim/lsp_servers/elixir
|
||||
curl -fLO https://github.com/elixir-lsp/elixir-ls/releases/latest/download/elixir-ls.zip
|
||||
mkdir -p $els_path
|
||||
unzip elixir-ls.zip -d $els_path/elixir-ls/
|
||||
chmod +x $els_path/elixir-ls/language_server.sh
|
||||
|
||||
]] --
|
||||
|
||||
local lsp_configs = {
|
||||
ansiblels = {},
|
||||
bashls = {},
|
||||
clangd = {},
|
||||
denols = {
|
||||
root_dir = lsp.util.root_pattern("deno.json"),
|
||||
},
|
||||
diagnosticls = {},
|
||||
dockerls = {},
|
||||
elixirls = {
|
||||
cmd = { vim.fn.expand '~/.local/share/nvim/lsp_servers/elixir/elixir-ls/language_server.sh' },
|
||||
settings = {
|
||||
elixirLS = {
|
||||
dialyzerEnabled = true,
|
||||
fetchDeps = false,
|
||||
}
|
||||
}
|
||||
},
|
||||
gopls = {},
|
||||
nimls = {},
|
||||
openscad_ls = {},
|
||||
pylsp = {},
|
||||
rnix = {},
|
||||
rust_analyzer = {},
|
||||
sqlls = {},
|
||||
sumneko_lua = {
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { 'vim' }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
terraform_lsp = {},
|
||||
tflint = {},
|
||||
vimls = {},
|
||||
-- tsserver = {},
|
||||
yamlls = {},
|
||||
}
|
||||
|
||||
local capabilities = require 'cmp_nvim_lsp'.update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
local common_config = {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
flags = {
|
||||
debounce_text_changes = 150
|
||||
},
|
||||
}
|
||||
|
||||
for server, config in pairs(lsp_configs) do
|
||||
for k, v in pairs(common_config) do config[k] = v end
|
||||
lsp[server].setup(config)
|
||||
end
|
||||
|
||||
require 'nvim-lsp-installer'.setup {
|
||||
automatic_installation = true,
|
||||
}
|
0
common/wezterm/.gitkeep
Normal file
0
common/wezterm/.gitkeep
Normal file
|
@ -10,6 +10,7 @@ l sway/mimeapps.list $c/mimeapps.list
|
|||
l sway/mimeapps.list $c/sway-mimeapps.list
|
||||
l sway/mimeapps.list $h/.local/share/applications/mimeapps.list
|
||||
l sway/lock $c/swaylock/config
|
||||
l hypr $c/hypr
|
||||
l mako $c/mako
|
||||
l kanshi $c/kanshi
|
||||
l gtk/2rc $h/.gtkrc-2.0
|
||||
|
|
163
os/linux/hypr/hyprland.conf
Normal file
163
os/linux/hypr/hyprland.conf
Normal file
|
@ -0,0 +1,163 @@
|
|||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
monitor=,preferred,auto,auto
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
|
||||
# Execute your favorite apps at launch
|
||||
exec-once = kitty & firefox & wezterm
|
||||
|
||||
# Source a file (multi-file configs)
|
||||
# source = ~/.config/hypr/myColors.conf
|
||||
|
||||
# Some default env vars.
|
||||
env = XCURSOR_SIZE,24
|
||||
|
||||
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
|
||||
input {
|
||||
kb_layout = us
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_options =
|
||||
kb_rules =
|
||||
|
||||
follow_mouse = 0
|
||||
|
||||
keyboard {
|
||||
repeat_delay 200
|
||||
repeat_rate 60
|
||||
}
|
||||
|
||||
touchpad {
|
||||
natural_scroll = no
|
||||
}
|
||||
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
}
|
||||
|
||||
general {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
gaps_in = 5
|
||||
gaps_out = 20
|
||||
border_size = 2
|
||||
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
|
||||
col.inactive_border = rgba(595959aa)
|
||||
|
||||
layout = dwindle
|
||||
}
|
||||
|
||||
decoration {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
rounding = 10
|
||||
blur = yes
|
||||
blur_size = 3
|
||||
blur_passes = 1
|
||||
blur_new_optimizations = on
|
||||
|
||||
drop_shadow = yes
|
||||
shadow_range = 4
|
||||
shadow_render_power = 3
|
||||
col.shadow = rgba(1a1a1aee)
|
||||
}
|
||||
|
||||
animations {
|
||||
enabled = yes
|
||||
|
||||
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
|
||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||
|
||||
animation = windows, 1, 7, myBezier
|
||||
animation = windowsOut, 1, 7, default, popin 80%
|
||||
animation = border, 1, 10, default
|
||||
animation = borderangle, 1, 8, default
|
||||
animation = fade, 1, 7, default
|
||||
animation = workspaces, 1, 6, default
|
||||
}
|
||||
|
||||
dwindle {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = yes # you probably want this
|
||||
}
|
||||
|
||||
master {
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
new_is_master = true
|
||||
}
|
||||
|
||||
gestures {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
workspace_swipe = off
|
||||
}
|
||||
|
||||
# Example per-device config
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
|
||||
device:epic-mouse-v1 {
|
||||
sensitivity = -0.5
|
||||
}
|
||||
|
||||
# Example windowrule v1
|
||||
# windowrule = float, ^(kitty)$
|
||||
# Example windowrule v2
|
||||
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
$mainMod = SUPER
|
||||
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
bind = $mainMod, Q, exec, kitty
|
||||
bind = $mainMod, U, exec, firefox
|
||||
bind = $mainMod, ret, exec, kitty
|
||||
bind = $mainMod, return, exec, kitty
|
||||
bind = $mainMod, C, killactive,
|
||||
bind = $mainMod, M, exit,
|
||||
bind = $mainMod, E, exec, dolphin
|
||||
bind = $mainMod, V, togglefloating,
|
||||
bind = $mainMod, R, exec, wofi --show drun
|
||||
bind = $mainMod, S, pseudo, # dwindle
|
||||
bind = $mainMod, P, togglesplit, # dwindle
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
bind = $mainMod, left, movefocus, l
|
||||
bind = $mainMod, right, movefocus, r
|
||||
bind = $mainMod, up, movefocus, u
|
||||
bind = $mainMod, down, movefocus, d
|
||||
bind = $mainMod, h, movefocus, l
|
||||
bind = $mainMod, l, movefocus, r
|
||||
bind = $mainMod, k, movefocus, u
|
||||
bind = $mainMod, j, movefocus, d
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
bind = $mainMod, 1, workspace, 1
|
||||
bind = $mainMod, 2, workspace, 2
|
||||
bind = $mainMod, 3, workspace, 3
|
||||
bind = $mainMod, 4, workspace, 4
|
||||
bind = $mainMod, 5, workspace, 5
|
||||
bind = $mainMod, 6, workspace, 6
|
||||
bind = $mainMod, 7, workspace, 7
|
||||
bind = $mainMod, 8, workspace, 8
|
||||
bind = $mainMod, 9, workspace, 9
|
||||
bind = $mainMod, 0, workspace, 10
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
||||
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
||||
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
||||
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
bind = $mainMod, mouse_down, workspace, e+1
|
||||
bind = $mainMod, mouse_up, workspace, e-1
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
Reference in a new issue