Compare commits
10 Commits
2b2ce07edc
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| f86016e4e5 | |||
| 4f293bd5e3 | |||
| 936681678e | |||
| 222874d285 | |||
| 781b26a4d6 | |||
| 6648cff3a1 | |||
| 3dcd700fe7 | |||
| c80c65a9ce | |||
| 2a8c9b52e0 | |||
| 7750d32da5 |
6
.bashrc
6
.bashrc
@@ -126,6 +126,9 @@ fi
|
|||||||
#export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
#export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||||
#gpgconf --launch gpg-agent
|
#gpgconf --launch gpg-agent
|
||||||
|
|
||||||
|
### ripgrep
|
||||||
|
export RIPGREP_CONFIG_PATH="$HOME/.ripgreprc"
|
||||||
|
|
||||||
### Passbook setup
|
### Passbook setup
|
||||||
export PASSBOOK_GPG_PATH="/usr/bin/gpg"
|
export PASSBOOK_GPG_PATH="/usr/bin/gpg"
|
||||||
export PASSBOOK_ROOT_DIRECTORY="/home/wholteza/.password-store"
|
export PASSBOOK_ROOT_DIRECTORY="/home/wholteza/.password-store"
|
||||||
@@ -213,3 +216,6 @@ fi
|
|||||||
export PATH="$HOME/.local/bin:$PATH"
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
export PATH=/home/$USER/.fnm:$PATH
|
export PATH=/home/$USER/.fnm:$PATH
|
||||||
eval "$(fnm env --use-on-cd --version-file-strategy=recursive)"
|
eval "$(fnm env --use-on-cd --version-file-strategy=recursive)"
|
||||||
|
|
||||||
|
alias qwerty='swaymsg input "*" xkb_layout "se"'
|
||||||
|
alias colemak='swaymsg input "*" xkb_layout "colemak-se"'
|
||||||
|
|||||||
@@ -16,19 +16,12 @@ vim.o.cursorline = true -- Highlight current line
|
|||||||
vim.o.winborder = "single" -- Borders around popups like when you press leader for keybinds
|
vim.o.winborder = "single" -- Borders around popups like when you press leader for keybinds
|
||||||
vim.opt.signcolumn =
|
vim.opt.signcolumn =
|
||||||
'yes' -- TEST: Prohibit layout shifting by always showing the sign column (left of line numbers), you should see an icon there on this row.
|
'yes' -- TEST: Prohibit layout shifting by always showing the sign column (left of line numbers), you should see an icon there on this row.
|
||||||
vim.o.autocomplete = true -- Turn on builtin autocomplete
|
vim.o.updatetime = 250 -- Speed up the CursorHold autocmd event
|
||||||
vim.o.complete = "o,.,w,b,u" -- Indicates what kind of items to show in the autocomplete
|
vim.o.timeoutlen = 300 -- Speed up completion of key event
|
||||||
vim.o.completeopt = "fuzzy,menuone,noselect,popup" -- Options for autocomplete
|
|
||||||
vim.o.pumheight = 7 -- Max items to show in autocomplete
|
|
||||||
vim.o.pummaxwidth = 80 -- Max width of autocomplete
|
|
||||||
vim.o.updatetime = 250
|
|
||||||
vim.o.timeoutlen = 300
|
|
||||||
|
|
||||||
-- SECTION: Globals
|
-- SECTION: Globals
|
||||||
vim.g.mapleader = ' ' -- Mapping leader to space.
|
vim.g.mapleader = ' ' -- Mapping leader to space.
|
||||||
vim.g.maplocalleader = ' ' -- Mapping leader to space.
|
vim.g.maplocalleader = ' ' -- Mapping leader to space.
|
||||||
vim.g.have_nerd_font = true -- Enable nerd font
|
vim.g.have_nerd_font = true -- Enable nerd font
|
||||||
|
|
||||||
-- SECTION: Lazy settings
|
-- SECTION: Lazy settings
|
||||||
-- INFO: Lines in this function will be executed after main event loop is free, prohibiting startup lag.
|
-- INFO: Lines in this function will be executed after main event loop is free, prohibiting startup lag.
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
@@ -50,18 +43,32 @@ vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
|||||||
vim.keymap.set('n', '<leader>f', vim.lsp.buf.format, { desc = "Format buffer" })
|
vim.keymap.set('n', '<leader>f', vim.lsp.buf.format, { desc = "Format buffer" })
|
||||||
|
|
||||||
-- Start the file picker in different modes
|
-- Start the file picker in different modes
|
||||||
vim.keymap.set('n', '<leader>sf', ":Pick files<CR>", { desc = "Search files" })
|
vim.keymap.set('n', '<leader>sf', function()
|
||||||
vim.keymap.set('n', '<leader>sg', ":Pick grep_live<CR>", { desc = "Search files" })
|
require('mini.pick').builtin.files()
|
||||||
|
end, { desc = "Search files" })
|
||||||
|
vim.keymap.set('n', '<leader>sg', ":Pick grep_live<CR>", { desc = "Search file contents" })
|
||||||
|
vim.keymap.set('n', '<leader>sh', ":Pick help<CR>", { desc = "Search help pages" })
|
||||||
|
vim.keymap.set('n', '<leader>sr', ":Pick resume<CR>", { desc = "Resume last search" })
|
||||||
|
vim.keymap.set('n', '<leader>sb', ":Pick buffers<CR>", { desc = "Search buffers" })
|
||||||
|
|
||||||
-- Get help with keybinds
|
-- Get help with keybinds
|
||||||
vim.keymap.set('n', '<leader>?', ":WhichKey<CR>", { desc = "Show keybinds" })
|
vim.keymap.set('n', '<leader>?', ":WhichKey<CR>", { desc = "Show keybinds" })
|
||||||
|
|
||||||
|
-- File explorer
|
||||||
|
vim.keymap.set('n', '\\', ":Oil --float<CR>", { desc = "File explorer" })
|
||||||
|
|
||||||
-- SECTION: Install packages
|
-- SECTION: Install packages
|
||||||
vim.pack.add({
|
vim.pack.add({
|
||||||
'https://github.com/catppuccin/nvim', -- color scheme
|
'https://github.com/catppuccin/nvim', -- color scheme
|
||||||
'https://github.com/nvim-mini/mini.pick', -- File picker, grep
|
'https://github.com/nvim-mini/mini.pick', -- File picker, grep
|
||||||
'https://github.com/nvim-mini/mini.pairs', -- Auto create {}, (), [] - pairs etc.
|
'https://github.com/nvim-mini/mini.pairs', -- Auto create {}, (), [] - pairs etc.
|
||||||
'https://github.com/nvim-mini/mini.notify', -- Popup notifications
|
'https://github.com/nvim-mini/mini.notify', -- Popup notifications
|
||||||
|
'https://github.com/nvim-mini/mini.completion', -- Autocomplete, needs snippets and icons
|
||||||
|
'https://github.com/nvim-mini/mini.snippets', -- Snippets
|
||||||
|
'https://github.com/nvim-mini/mini.icons', -- Icons
|
||||||
|
'https://github.com/nvim-mini/mini.cursorword', -- Highlight word under cursor
|
||||||
|
'https://github.com/nvim-mini/mini.hipatterns', -- Highlight todos and rgb colors
|
||||||
|
'https://github.com/nvim-mini/mini.statusline', -- Statusline at the bottom
|
||||||
'https://github.com/neovim/nvim-lspconfig', -- Language servers
|
'https://github.com/neovim/nvim-lspconfig', -- Language servers
|
||||||
'https://github.com/mason-org/mason.nvim', -- LSP deps installer
|
'https://github.com/mason-org/mason.nvim', -- LSP deps installer
|
||||||
'https://github.com/mason-org/mason-lspconfig.nvim', -- Lets you install mason tooling using lsp names
|
'https://github.com/mason-org/mason-lspconfig.nvim', -- Lets you install mason tooling using lsp names
|
||||||
@@ -69,9 +76,8 @@ vim.pack.add({
|
|||||||
'https://github.com/folke/lazydev.nvim', -- Automatically resolve vim api paths.
|
'https://github.com/folke/lazydev.nvim', -- Automatically resolve vim api paths.
|
||||||
'https://github.com/folke/which-key.nvim', -- Shortcut hints (bar at the bottom when pressing space)
|
'https://github.com/folke/which-key.nvim', -- Shortcut hints (bar at the bottom when pressing space)
|
||||||
'https://github.com/nvim-lua/plenary.nvim', -- Helper lua functions, dep of todo-comments.
|
'https://github.com/nvim-lua/plenary.nvim', -- Helper lua functions, dep of todo-comments.
|
||||||
'https://github.com/folke/todo-comments.nvim', -- Helper lua functions, dep of todo-comments.
|
'https://github.com/nvim-treesitter/nvim-treesitter', -- Syntax highlighting
|
||||||
'https://github.com/nvim-treesitter/nvim-treesitter',
|
'https://github.com/stevearc/oil.nvim', -- File explorer
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- SECTION: Colorscheme
|
-- SECTION: Colorscheme
|
||||||
@@ -89,19 +95,40 @@ wk.add({
|
|||||||
{ '<leader>o', group = 'Source current file', mode = { 'n' } },
|
{ '<leader>o', group = 'Source current file', mode = { 'n' } },
|
||||||
})
|
})
|
||||||
|
|
||||||
require('todo-comments').setup({
|
|
||||||
keywords = {
|
-- require('todo-comments').setup({
|
||||||
SECTION = {
|
-- keywords = {
|
||||||
icon = " ",
|
-- SECTION = {
|
||||||
color = "hint",
|
-- icon = " ",
|
||||||
}
|
-- color = "hint",
|
||||||
}
|
-- }
|
||||||
})
|
-- }
|
||||||
|
-- })
|
||||||
|
|
||||||
-- Mini
|
-- Mini
|
||||||
require('mini.pick').setup()
|
local MiniPicker = require('mini.pick').setup({
|
||||||
|
source = {
|
||||||
|
show = require('mini.pick').default_show,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
require('mini.pairs').setup()
|
require('mini.pairs').setup()
|
||||||
require('mini.notify').setup()
|
require('mini.notify').setup()
|
||||||
|
require('mini.icons').setup()
|
||||||
|
MiniIcons.tweak_lsp_kind()
|
||||||
|
require('mini.snippets').setup()
|
||||||
|
require('mini.completion').setup()
|
||||||
|
require('mini.cursorword').setup()
|
||||||
|
require('mini.hipatterns').setup({
|
||||||
|
highlighters = {
|
||||||
|
todo = { pattern = '%f[%w]()TODO()%f[%W]', group = 'MiniHipatternsTodo' },
|
||||||
|
section = { pattern = '%f[%w]()SECTION()%f[%W]', group = 'MiniHipatternsNote' },
|
||||||
|
warning = { pattern = '%f[%w]()WARNING()%f[%W]', group = 'MiniHipatternsHack' },
|
||||||
|
error = { pattern = '%f[%w]()ERROR()%f[%W]', group = 'MiniHipatternsTodo' },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
require('mini.statusline').setup()
|
||||||
|
require('oil').setup()
|
||||||
|
|
||||||
require('nvim-treesitter').setup({
|
require('nvim-treesitter').setup({
|
||||||
auto_install = true
|
auto_install = true
|
||||||
@@ -111,7 +138,12 @@ require('nvim-treesitter').setup({
|
|||||||
require("mason").setup()
|
require("mason").setup()
|
||||||
require("mason-lspconfig").setup({
|
require("mason-lspconfig").setup({
|
||||||
-- Install lsp deps here
|
-- Install lsp deps here
|
||||||
ensure_installed = { 'lua_ls' },
|
ensure_installed = {
|
||||||
|
'lua_ls',
|
||||||
|
'ts_ls',
|
||||||
|
'ansiblels',
|
||||||
|
'eslint'
|
||||||
|
},
|
||||||
automatic_enable = true
|
automatic_enable = true
|
||||||
})
|
})
|
||||||
require("mason-tool-installer").setup({
|
require("mason-tool-installer").setup({
|
||||||
@@ -122,20 +154,7 @@ require("mason-tool-installer").setup({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- SECTION: Autocommands
|
-- SECTION: Helpers
|
||||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
|
||||||
desc = 'Highlight when yanking (copying) text',
|
|
||||||
group = vim.api.nvim_create_augroup('highlight-yank', { clear = true }),
|
|
||||||
callback = function()
|
|
||||||
vim.highlight.on_yank()
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Actions on LspAttach
|
|
||||||
vim.api.nvim_create_autocmd('LspAttach', {
|
|
||||||
group = vim.api.nvim_create_augroup('my.lsp', {}),
|
|
||||||
callback = function(ev)
|
|
||||||
-- INFO: Helpers
|
|
||||||
local function client_supports_method(client, method, bufnr)
|
local function client_supports_method(client, method, bufnr)
|
||||||
if vim.fn.has 'nvim-0.11' == 1 then
|
if vim.fn.has 'nvim-0.11' == 1 then
|
||||||
return client:supports_method(method, bufnr)
|
return client:supports_method(method, bufnr)
|
||||||
@@ -144,12 +163,20 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- SECTION: Autocommands
|
||||||
|
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||||
|
desc = 'Highlight when yanking (copying) text',
|
||||||
|
group = vim.api.nvim_create_augroup('highlight-yank', { clear = true }),
|
||||||
|
callback = function()
|
||||||
|
vim.highlight.on_yank()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
-- Actions on LspAttach
|
||||||
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
|
group = vim.api.nvim_create_augroup('my.lsp', {}),
|
||||||
|
callback = function(ev)
|
||||||
local client = assert(vim.lsp.get_client_by_id(ev.data.client_id))
|
local client = assert(vim.lsp.get_client_by_id(ev.data.client_id))
|
||||||
|
|
||||||
-- Enable auto-completion
|
|
||||||
if client:supports_method('textDocument/completion') then
|
|
||||||
vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true })
|
|
||||||
end
|
|
||||||
-- Auto-format ("lint") on save.
|
-- Auto-format ("lint") on save.
|
||||||
-- Usually not needed if server supports "textDocument/willSaveWaitUntil".
|
-- Usually not needed if server supports "textDocument/willSaveWaitUntil".
|
||||||
if not client:supports_method('textDocument/willSaveWaitUntil')
|
if not client:supports_method('textDocument/willSaveWaitUntil')
|
||||||
@@ -163,30 +190,6 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Highlight the word you are standing on after a little while
|
|
||||||
if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_documentHighlight, ev.buf) then
|
|
||||||
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
|
|
||||||
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
|
|
||||||
buffer = ev.buf,
|
|
||||||
group = highlight_augroup,
|
|
||||||
callback = vim.lsp.buf.document_highlight,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
|
|
||||||
buffer = ev.buf,
|
|
||||||
group = highlight_augroup,
|
|
||||||
callback = vim.lsp.buf.clear_references,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('LspDetach', {
|
|
||||||
group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }),
|
|
||||||
callback = function(event2)
|
|
||||||
vim.lsp.buf.clear_references()
|
|
||||||
vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event2.buf }
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Swap out the icons in the leftmost column and show inlay hints
|
-- Swap out the icons in the leftmost column and show inlay hints
|
||||||
vim.diagnostic.config {
|
vim.diagnostic.config {
|
||||||
severity_sort = true,
|
severity_sort = true,
|
||||||
|
|||||||
@@ -20,6 +20,22 @@
|
|||||||
"rev": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65",
|
"rev": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65",
|
||||||
"src": "https://github.com/mason-org/mason.nvim"
|
"src": "https://github.com/mason-org/mason.nvim"
|
||||||
},
|
},
|
||||||
|
"mini.completion": {
|
||||||
|
"rev": "4f94cafdeef02bf3ef9997cd6862658801caa22c",
|
||||||
|
"src": "https://github.com/nvim-mini/mini.completion"
|
||||||
|
},
|
||||||
|
"mini.cursorword": {
|
||||||
|
"rev": "8dcf45bc820f3c5f778960ba55206938246b70b7",
|
||||||
|
"src": "https://github.com/nvim-mini/mini.cursorword"
|
||||||
|
},
|
||||||
|
"mini.hipatterns": {
|
||||||
|
"rev": "2c5dce6dc7443de814d16f7470549811ee86e664",
|
||||||
|
"src": "https://github.com/nvim-mini/mini.hipatterns"
|
||||||
|
},
|
||||||
|
"mini.icons": {
|
||||||
|
"rev": "5b9076dae1bfbe47ba4a14bc8b967cde0ab5d77e",
|
||||||
|
"src": "https://github.com/nvim-mini/mini.icons"
|
||||||
|
},
|
||||||
"mini.notify": {
|
"mini.notify": {
|
||||||
"rev": "e506fb6da26c0a31ee6b1d2eb99626cb147f28ca",
|
"rev": "e506fb6da26c0a31ee6b1d2eb99626cb147f28ca",
|
||||||
"src": "https://github.com/nvim-mini/mini.notify"
|
"src": "https://github.com/nvim-mini/mini.notify"
|
||||||
@@ -36,6 +52,18 @@
|
|||||||
"rev": "8521fe21df86e08d9e4b3c3f3a7d50e47954e1af",
|
"rev": "8521fe21df86e08d9e4b3c3f3a7d50e47954e1af",
|
||||||
"src": "https://github.com/nvim-mini/mini.pick"
|
"src": "https://github.com/nvim-mini/mini.pick"
|
||||||
},
|
},
|
||||||
|
"mini.snippets": {
|
||||||
|
"rev": "0d0b435e3f9563965f73703a6a6d17acb432a93c",
|
||||||
|
"src": "https://github.com/nvim-mini/mini.snippets"
|
||||||
|
},
|
||||||
|
"mini.statusline": {
|
||||||
|
"rev": "8c3829d4ef02b693f68e43fc131b433f11049b2b",
|
||||||
|
"src": "https://github.com/nvim-mini/mini.statusline"
|
||||||
|
},
|
||||||
|
"mini.tabline": {
|
||||||
|
"rev": "d03f10bf562cef57bd9f80f82c54269ff4816a15",
|
||||||
|
"src": "https://github.com/nvim-mini/mini.tabline"
|
||||||
|
},
|
||||||
"nvim": {
|
"nvim": {
|
||||||
"rev": "384f304c8b04664c9e0091fbfb3923c5f97c1bcf",
|
"rev": "384f304c8b04664c9e0091fbfb3923c5f97c1bcf",
|
||||||
"src": "https://github.com/catppuccin/nvim"
|
"src": "https://github.com/catppuccin/nvim"
|
||||||
@@ -48,6 +76,10 @@
|
|||||||
"rev": "eb1f8e80cb28eb7892f347609e0bdc5eb574b945",
|
"rev": "eb1f8e80cb28eb7892f347609e0bdc5eb574b945",
|
||||||
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
|
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||||
},
|
},
|
||||||
|
"oil.nvim": {
|
||||||
|
"rev": "0fcc83805ad11cf714a949c98c605ed717e0b83e",
|
||||||
|
"src": "https://github.com/stevearc/oil.nvim"
|
||||||
|
},
|
||||||
"plenary.nvim": {
|
"plenary.nvim": {
|
||||||
"rev": "b9fd5226c2f76c951fc8ed5923d85e4de065e509",
|
"rev": "b9fd5226c2f76c951fc8ed5923d85e4de065e509",
|
||||||
"src": "https://github.com/nvim-lua/plenary.nvim"
|
"src": "https://github.com/nvim-lua/plenary.nvim"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ input "*" xkb_options caps:backspace
|
|||||||
## Set colemak layout on surface laptop
|
## Set colemak layout on surface laptop
|
||||||
input 1118:2478:Microsoft_Surface_045E:09AE_Keyboard xkb_layout colemak-se
|
input 1118:2478:Microsoft_Surface_045E:09AE_Keyboard xkb_layout colemak-se
|
||||||
## Set colemak layout on printer desktop
|
## Set colemak layout on printer desktop
|
||||||
#input 9494:26:CM_Storm_Keyboard_--_QuickFire_XT xkb_layout colemak-se
|
input 9494:26:CM_Storm_Keyboard_--_QuickFire_XT xkb_layout colemak-se
|
||||||
## Remove pointer acceleration
|
## Remove pointer acceleration
|
||||||
input "type:pointer" {
|
input "type:pointer" {
|
||||||
accel_profile "flat"
|
accel_profile "flat"
|
||||||
|
|||||||
@@ -19,3 +19,5 @@
|
|||||||
s = status
|
s = status
|
||||||
[pull]
|
[pull]
|
||||||
rebase = false
|
rebase = false
|
||||||
|
[core]
|
||||||
|
editor = vim
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vue/typescript-plugin": "^3.2.2",
|
"@vue/typescript-plugin": "^3.2.2",
|
||||||
|
"jiti": "^2.6.1",
|
||||||
"neovim": "^5.4.0"
|
"neovim": "^5.4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user