mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-02 01:47:43 +00:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1222b8fdb3 | |||
| cced3a5310 | |||
|
|
6c680a0fa9 | ||
|
|
6746fb5381 | ||
| 7b2831ec94 | |||
| a605d46294 | |||
|
|
5e98f61942 | ||
|
|
e2583f4d91 | ||
| 80b2e542bf | |||
| 9c3ba8f2e8 | |||
| 632424ecf9 | |||
|
|
8c8436254e | ||
|
|
fe6f070beb | ||
|
|
2a5b2400d7 | ||
| e109cca22a | |||
| 1d948f6915 | |||
|
|
14c3e376dc | ||
|
|
75a32331b0 |
21
Brewfile
21
Brewfile
@@ -10,11 +10,10 @@ tap "homebrew/cask"
|
|||||||
tap "homebrew/cask-fonts"
|
tap "homebrew/cask-fonts"
|
||||||
tap "homebrew/core"
|
tap "homebrew/core"
|
||||||
tap "homebrew/services"
|
tap "homebrew/services"
|
||||||
|
tap "mongodb/brew"
|
||||||
tap "shivammathur/extensions"
|
tap "shivammathur/extensions"
|
||||||
tap "shivammathur/php"
|
tap "shivammathur/php"
|
||||||
tap "teamookla/speedtest"
|
tap "teamookla/speedtest"
|
||||||
# Interpreted, interactive, object-oriented programming language
|
|
||||||
brew "python@3.10"
|
|
||||||
# Automate deployment, configuration, and upgrading
|
# Automate deployment, configuration, and upgrading
|
||||||
brew "ansible"
|
brew "ansible"
|
||||||
# Zstandard is a real-time compression algorithm
|
# Zstandard is a real-time compression algorithm
|
||||||
@@ -35,6 +34,8 @@ brew "glib"
|
|||||||
brew "pkg-config"
|
brew "pkg-config"
|
||||||
# Open source suite of directory software
|
# Open source suite of directory software
|
||||||
brew "openldap"
|
brew "openldap"
|
||||||
|
# Get a file from an HTTP, HTTPS or FTP server
|
||||||
|
brew "curl"
|
||||||
# Libraries to talk to Microsoft SQL Server and Sybase databases
|
# Libraries to talk to Microsoft SQL Server and Sybase databases
|
||||||
brew "freetds"
|
brew "freetds"
|
||||||
# C/C++ and Java libraries for Unicode and globalization
|
# C/C++ and Java libraries for Unicode and globalization
|
||||||
@@ -47,6 +48,8 @@ brew "php"
|
|||||||
brew "composer"
|
brew "composer"
|
||||||
# GNU File, Shell, and Text utilities
|
# GNU File, Shell, and Text utilities
|
||||||
brew "coreutils"
|
brew "coreutils"
|
||||||
|
# Get, unpack, build, and install modules from CPAN
|
||||||
|
brew "cpanminus"
|
||||||
# Diff that understands syntax
|
# Diff that understands syntax
|
||||||
brew "difftastic"
|
brew "difftastic"
|
||||||
# Tool for exploring each layer in a docker image
|
# Tool for exploring each layer in a docker image
|
||||||
@@ -57,6 +60,8 @@ brew "dog"
|
|||||||
brew "eg-examples"
|
brew "eg-examples"
|
||||||
# CLI for templating and/or deploying FaaS functions
|
# CLI for templating and/or deploying FaaS functions
|
||||||
brew "faas-cli"
|
brew "faas-cli"
|
||||||
|
# Simple, fast and user-friendly alternative to find
|
||||||
|
brew "fd"
|
||||||
# Monitor a directory for changes and run a shell command
|
# Monitor a directory for changes and run a shell command
|
||||||
brew "fswatch"
|
brew "fswatch"
|
||||||
# GitHub command-line tool
|
# GitHub command-line tool
|
||||||
@@ -113,6 +118,8 @@ brew "m-cli"
|
|||||||
brew "mas"
|
brew "mas"
|
||||||
# Terminal-based visual file manager
|
# Terminal-based visual file manager
|
||||||
brew "midnight-commander"
|
brew "midnight-commander"
|
||||||
|
# Ambitious Vim-fork focused on extensibility and agility
|
||||||
|
brew "neovim"
|
||||||
# Port scanning utility for large networks
|
# Port scanning utility for large networks
|
||||||
brew "nmap"
|
brew "nmap"
|
||||||
# Manage multiple Node.js versions
|
# Manage multiple Node.js versions
|
||||||
@@ -121,6 +128,10 @@ brew "nvm"
|
|||||||
brew "openjdk"
|
brew "openjdk"
|
||||||
# Generate clients, server & docs from an OpenAPI spec (v2, v3)
|
# Generate clients, server & docs from an OpenAPI spec (v2, v3)
|
||||||
brew "openapi-generator"
|
brew "openapi-generator"
|
||||||
|
# Highly capable, feature-rich programming language
|
||||||
|
brew "perl"
|
||||||
|
# Interpreted, interactive, object-oriented programming language
|
||||||
|
brew "python@3.10"
|
||||||
# Interpreted, interactive, object-oriented programming language
|
# Interpreted, interactive, object-oriented programming language
|
||||||
brew "python@3.8"
|
brew "python@3.8"
|
||||||
# RC file (dotfile) management
|
# RC file (dotfile) management
|
||||||
@@ -161,6 +172,8 @@ brew "watch"
|
|||||||
brew "wget"
|
brew "wget"
|
||||||
# Personal information dashboard for your terminal
|
# Personal information dashboard for your terminal
|
||||||
brew "wtfutil"
|
brew "wtfutil"
|
||||||
|
# JavaScript package manager
|
||||||
|
brew "yarn"
|
||||||
# Tracks most-used directories to make cd smarter
|
# Tracks most-used directories to make cd smarter
|
||||||
brew "z"
|
brew "z"
|
||||||
# A vulnerability scanner for container images and filesystems
|
# A vulnerability scanner for container images and filesystems
|
||||||
@@ -169,6 +182,8 @@ brew "anchore/grype/grype"
|
|||||||
brew "ddosify/tap/ddosify"
|
brew "ddosify/tap/ddosify"
|
||||||
# lets you quickly switch between multiple git user profiles
|
# lets you quickly switch between multiple git user profiles
|
||||||
brew "gesquive/tap/git-user"
|
brew "gesquive/tap/git-user"
|
||||||
|
# High-performance, schema-free, document-oriented database
|
||||||
|
brew "mongodb/brew/mongodb-community"
|
||||||
# Xdebug PHP extension
|
# Xdebug PHP extension
|
||||||
brew "shivammathur/extensions/xdebug@7.4"
|
brew "shivammathur/extensions/xdebug@7.4"
|
||||||
# Xdebug PHP extension
|
# Xdebug PHP extension
|
||||||
@@ -217,6 +232,8 @@ cask "insomnia"
|
|||||||
cask "jetbrains-toolbox"
|
cask "jetbrains-toolbox"
|
||||||
# Kubernetes IDE
|
# Kubernetes IDE
|
||||||
cask "lens"
|
cask "lens"
|
||||||
|
# Neovim Client
|
||||||
|
cask "neovide"
|
||||||
# Reverse proxy, secure introspectable tunnels to localhost
|
# Reverse proxy, secure introspectable tunnels to localhost
|
||||||
cask "ngrok"
|
cask "ngrok"
|
||||||
# Collaboration platform for API development
|
# Collaboration platform for API development
|
||||||
|
|||||||
@@ -42,9 +42,9 @@ and you need git to clone the repo. This will change soon™.
|
|||||||
|
|
||||||
`.local/bin/dfm` is a shell script that has some tools that help with dotfiles management.
|
`.local/bin/dfm` is a shell script that has some tools that help with dotfiles management.
|
||||||
|
|
||||||
### `scripts/install.sh` - dotfiles linker
|
### `scripts/install-dotfiles.sh` - dotfiles linker
|
||||||
|
|
||||||
The `scripts/install.sh` is a `rcm` generated shell script that does all the necessary linking.
|
The `scripts/install-dotfiles.sh` is a `rcm` generated shell script that does all the necessary linking.
|
||||||
|
|
||||||
To refresh the file, you can run `dfm dotfiles update`
|
To refresh the file, you can run `dfm dotfiles update`
|
||||||
|
|
||||||
|
|||||||
@@ -68,9 +68,11 @@ alias code_scanner='docker run \
|
|||||||
alias composerUp='composer global update'
|
alias composerUp='composer global update'
|
||||||
alias npmUp='npm -g up'
|
alias npmUp='npm -g up'
|
||||||
|
|
||||||
alias zedit='code ~/.zshrc ~/.alias'
|
alias zedit='$EDITOR ~/.zshrc ~/.alias'
|
||||||
|
alias zdots='$EDITOR ~/.dotfiles'
|
||||||
|
|
||||||
if [[ -f "$HOME/.aliases.local" ]]; then
|
if [[ -f "$HOME/.aliases.local" ]]; then
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
source "$HOME/.aliases.local"
|
source "$HOME/.aliases.local"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
6
config/flipperdevices.com/qFlipper.ini
Normal file
6
config/flipperdevices.com/qFlipper.ini
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[General]
|
||||||
|
ApplicationUpdateChannel=release
|
||||||
|
CheckApplicatonUpdates=true
|
||||||
|
FirmwareUpdateChannel=release
|
||||||
|
LastFolderUrl=/Users/ivuorinen
|
||||||
|
ShowHiddenFiles=false
|
||||||
@@ -16,3 +16,4 @@ cachegrind.out.*
|
|||||||
composer.phar
|
composer.phar
|
||||||
wp_*.sh
|
wp_*.sh
|
||||||
auth.json
|
auth.json
|
||||||
|
dfm.sh
|
||||||
|
|||||||
645
config/nvim/init.lua
Normal file
645
config/nvim/init.lua
Normal file
@@ -0,0 +1,645 @@
|
|||||||
|
-- Install packer
|
||||||
|
local install_path = vim.fn.stdpath 'data' .. '/site/pack/packer/start/packer.nvim'
|
||||||
|
local is_bootstrap = false
|
||||||
|
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
|
||||||
|
is_bootstrap = true
|
||||||
|
vim.fn.system {
|
||||||
|
'git', 'clone', '--depth', '1',
|
||||||
|
'https://github.com/wbthomason/packer.nvim',
|
||||||
|
install_path
|
||||||
|
}
|
||||||
|
vim.cmd [[packadd packer.nvim]]
|
||||||
|
end
|
||||||
|
|
||||||
|
require('packer').startup(function(use)
|
||||||
|
-- Package manager
|
||||||
|
use 'wbthomason/packer.nvim'
|
||||||
|
|
||||||
|
use { -- LSP Configuration & Plugins
|
||||||
|
'neovim/nvim-lspconfig',
|
||||||
|
requires = {
|
||||||
|
-- Automatically install LSPs to stdpath for neovim
|
||||||
|
'williamboman/mason.nvim',
|
||||||
|
'williamboman/mason-lspconfig.nvim',
|
||||||
|
|
||||||
|
-- Useful status updates for LSP
|
||||||
|
'j-hui/fidget.nvim',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
use { -- Autocompletion
|
||||||
|
'hrsh7th/nvim-cmp',
|
||||||
|
requires = {
|
||||||
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
|
'L3MON4D3/LuaSnip',
|
||||||
|
'saadparwaiz1/cmp_luasnip',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
use { -- Highlight, edit, and navigate code
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
run = function()
|
||||||
|
pcall(require('nvim-treesitter.install').update { with_sync = true })
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
use { -- Additional text objects via treesitter
|
||||||
|
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||||
|
after = 'nvim-treesitter',
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Git related plugins
|
||||||
|
use 'tpope/vim-fugitive'
|
||||||
|
use 'tpope/vim-rhubarb'
|
||||||
|
use 'lewis6991/gitsigns.nvim'
|
||||||
|
|
||||||
|
-- Theme based off the Material Pale Night
|
||||||
|
use 'drewtempelmeyer/palenight.vim'
|
||||||
|
-- Fancier statusline
|
||||||
|
use 'nvim-lualine/lualine.nvim'
|
||||||
|
-- Add indentation guides even on blank lines.
|
||||||
|
use 'lukas-reineke/indent-blankline.nvim'
|
||||||
|
-- "gc" to comment visual regions/lines
|
||||||
|
use 'numToStr/Comment.nvim'
|
||||||
|
-- Detect tabstop and shiftwidth automatically.
|
||||||
|
use 'tpope/vim-sleuth'
|
||||||
|
|
||||||
|
-- Fuzzy Finder (files, lsp, etc)
|
||||||
|
use { 'nvim-telescope/telescope.nvim',
|
||||||
|
branch = '0.1.x',
|
||||||
|
requires = { 'nvim-lua/plenary.nvim' }
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Fuzzy Finder Algorithm which requires local dependencies to be built.
|
||||||
|
-- Only load if `make` is available
|
||||||
|
use { 'nvim-telescope/telescope-fzf-native.nvim',
|
||||||
|
run = 'make', cond = vim.fn.executable 'make' == 1 }
|
||||||
|
|
||||||
|
-- Add custom plugins to packer from
|
||||||
|
-- ~/.config/nvim/lua/custom/plugins.lua
|
||||||
|
local has_plugins, plugins = pcall(require, 'custom.plugins')
|
||||||
|
if has_plugins then
|
||||||
|
plugins(use)
|
||||||
|
end
|
||||||
|
|
||||||
|
if is_bootstrap then
|
||||||
|
require('packer').sync()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- When we are bootstrapping a configuration, it doesn't
|
||||||
|
-- make sense to execute the rest of the init.lua.
|
||||||
|
--
|
||||||
|
-- You'll need to restart nvim, and then it will work.
|
||||||
|
if is_bootstrap then
|
||||||
|
print '=================================='
|
||||||
|
print ' Plugins are being installed'
|
||||||
|
print ' Wait until Packer completes,'
|
||||||
|
print ' then restart nvim'
|
||||||
|
print '=================================='
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Automatically source and re-compile packer
|
||||||
|
-- whenever you save this init.lua, or packages.lua
|
||||||
|
local packer_group = vim.api.nvim_create_augroup('Packer', { clear = true })
|
||||||
|
vim.api.nvim_create_autocmd('BufWritePost', {
|
||||||
|
command = 'source <afile> | PackerCompile',
|
||||||
|
group = packer_group,
|
||||||
|
pattern = { vim.fn.expand '$MYVIMRC', '~/.dotfiles/config/nvim/**/*.lua' },
|
||||||
|
})
|
||||||
|
|
||||||
|
-- [[ Setting options ]]
|
||||||
|
-- See `:help vim.o`
|
||||||
|
|
||||||
|
-- Set highlight on search
|
||||||
|
vim.o.hlsearch = false
|
||||||
|
|
||||||
|
-- Make line numbers default, enabled relative linenumbers
|
||||||
|
vim.wo.number = true
|
||||||
|
vim.opt.relativenumber = true
|
||||||
|
|
||||||
|
-- Enable mouse mode
|
||||||
|
vim.o.mouse = 'a'
|
||||||
|
|
||||||
|
-- Enable break indent
|
||||||
|
vim.o.breakindent = true
|
||||||
|
|
||||||
|
-- Save undo history
|
||||||
|
vim.o.undofile = true
|
||||||
|
|
||||||
|
-- Case insensitive searching UNLESS /C or capital in search
|
||||||
|
vim.o.ignorecase = true
|
||||||
|
vim.o.smartcase = true
|
||||||
|
|
||||||
|
-- Decrease update time
|
||||||
|
vim.o.updatetime = 250
|
||||||
|
vim.wo.signcolumn = 'yes'
|
||||||
|
|
||||||
|
-- Set colorscheme
|
||||||
|
vim.o.termguicolors = true
|
||||||
|
vim.cmd.colorscheme('palenight')
|
||||||
|
|
||||||
|
-- Set completeopt to have a better completion experience
|
||||||
|
vim.o.completeopt = 'menuone,noselect'
|
||||||
|
|
||||||
|
-- Configure and disable providers.
|
||||||
|
vim.g.python3_host_prog = '/opt/homebrew/bin/python3'
|
||||||
|
vim.g.loaded_ruby_provider = 0
|
||||||
|
|
||||||
|
-- Setup winbar
|
||||||
|
-- See :h statusline
|
||||||
|
vim.o.winbar = '%=%m %f'
|
||||||
|
|
||||||
|
-- [[ Basic Keymaps ]]
|
||||||
|
-- Set <space> as the leader key
|
||||||
|
-- See `:help mapleader`
|
||||||
|
-- NOTE: Must happen before plugins are required
|
||||||
|
-- (otherwise wrong leader will be used)
|
||||||
|
vim.g.mapleader = ' '
|
||||||
|
vim.g.maplocalleader = ' '
|
||||||
|
|
||||||
|
-- Keymaps for better default experience
|
||||||
|
-- See `:help vim.keymap.set()`
|
||||||
|
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
|
||||||
|
|
||||||
|
-- Remap for dealing with word wrap
|
||||||
|
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||||
|
vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||||
|
|
||||||
|
local highlight_group = vim.api.nvim_create_augroup(
|
||||||
|
'YankHighlight', { clear = true }
|
||||||
|
)
|
||||||
|
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||||
|
callback = function()
|
||||||
|
vim.highlight.on_yank()
|
||||||
|
end,
|
||||||
|
group = highlight_group,
|
||||||
|
pattern = '*',
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Set lualine as statusline
|
||||||
|
-- See `:help lualine.txt`
|
||||||
|
require('lualine').setup {
|
||||||
|
options = {
|
||||||
|
icons_enabled = true,
|
||||||
|
theme = 'auto',
|
||||||
|
component_separators = '|',
|
||||||
|
section_separators = '',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Enable Comment.nvim
|
||||||
|
require('Comment').setup()
|
||||||
|
|
||||||
|
-- Enable `lukas-reineke/indent-blankline.nvim`
|
||||||
|
-- See `:help indent_blankline.txt`
|
||||||
|
require('indent_blankline').setup {
|
||||||
|
-- char = '┊',
|
||||||
|
show_trailing_blankline_indent = true,
|
||||||
|
space_char_blankline = " ",
|
||||||
|
show_current_context = true,
|
||||||
|
show_current_context_start = true,
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Gitsigns
|
||||||
|
-- See `:help gitsigns.txt`
|
||||||
|
require('gitsigns').setup {
|
||||||
|
signs = {
|
||||||
|
add = { text = '+' },
|
||||||
|
change = { text = '~' },
|
||||||
|
delete = { text = '_' },
|
||||||
|
topdelete = { text = '‾' },
|
||||||
|
changedelete = { text = '~' },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- [[ Configure Telescope ]]
|
||||||
|
-- See `:help telescope` and `:help telescope.setup()`
|
||||||
|
require('telescope').setup {
|
||||||
|
defaults = {
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
['<C-u>'] = false,
|
||||||
|
['<C-d>'] = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Enable telescope fzf native, if installed
|
||||||
|
pcall(require('telescope').load_extension, 'fzf')
|
||||||
|
|
||||||
|
-- See `:help telescope.builtin`
|
||||||
|
vim.keymap.set('n', '<leader>?', require('telescope.builtin').oldfiles,
|
||||||
|
{ desc = '[?] Find recently opened files' })
|
||||||
|
vim.keymap.set('n', '<leader><space>', require('telescope.builtin').buffers,
|
||||||
|
{ desc = '[ ] Find existing buffers' })
|
||||||
|
vim.keymap.set('n', '<leader>/', function()
|
||||||
|
-- You can pass additional configuration to telescope to
|
||||||
|
-- change theme, layout, etc.
|
||||||
|
require('telescope.builtin').current_buffer_fuzzy_find(
|
||||||
|
require('telescope.themes').get_dropdown {
|
||||||
|
winblend = 10,
|
||||||
|
previewer = false,
|
||||||
|
})
|
||||||
|
end, { desc = '[/] Fuzzily search in current buffer]' })
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>sf', require('telescope.builtin').find_files,
|
||||||
|
{ desc = '[S]earch [F]iles' })
|
||||||
|
vim.keymap.set('n', '<leader>sh', require('telescope.builtin').help_tags,
|
||||||
|
{ desc = '[S]earch [H]elp' })
|
||||||
|
vim.keymap.set('n', '<leader>sw', require('telescope.builtin').grep_string,
|
||||||
|
{ desc = '[S]earch current [W]ord' })
|
||||||
|
vim.keymap.set('n', '<leader>sg', require('telescope.builtin').live_grep,
|
||||||
|
{ desc = '[S]earch by [G]rep' })
|
||||||
|
vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics,
|
||||||
|
{ desc = '[S]earch [D]iagnostics' })
|
||||||
|
|
||||||
|
-- Load custom treesitter grammar for org filetype
|
||||||
|
require('orgmode').setup_ts_grammar()
|
||||||
|
|
||||||
|
-- [[ Configure Treesitter ]]
|
||||||
|
-- See `:help nvim-treesitter`
|
||||||
|
require('nvim-treesitter.configs').setup {
|
||||||
|
-- Add languages to be installed here that you want
|
||||||
|
-- installed for treesitter
|
||||||
|
ensure_installed = {
|
||||||
|
'bash',
|
||||||
|
'c', 'comment', 'cpp',
|
||||||
|
'diff', 'dockerfile',
|
||||||
|
'gitattributes', 'gitignore', 'go',
|
||||||
|
'html', 'http',
|
||||||
|
'javascript', 'jq', 'jsdoc', 'json',
|
||||||
|
'lua',
|
||||||
|
'markdown',
|
||||||
|
'org',
|
||||||
|
'php', 'phpdoc', 'python',
|
||||||
|
'regex', 'rust',
|
||||||
|
'scss', 'sql',
|
||||||
|
'typescript',
|
||||||
|
'vim', 'vue',
|
||||||
|
'yaml',
|
||||||
|
'help',
|
||||||
|
},
|
||||||
|
|
||||||
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
-- Required for spellcheck, some LaTex highlights and
|
||||||
|
-- code block highlights that do not have ts grammar
|
||||||
|
additional_vim_regex_highlighting = {'org'},
|
||||||
|
},
|
||||||
|
|
||||||
|
indent = { enable = true, disable = { 'python' } },
|
||||||
|
|
||||||
|
incremental_selection = {
|
||||||
|
enable = true,
|
||||||
|
keymaps = {
|
||||||
|
init_selection = '<c-space>',
|
||||||
|
node_incremental = '<c-space>',
|
||||||
|
scope_incremental = '<c-s>',
|
||||||
|
node_decremental = '<c-backspace>',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
textobjects = {
|
||||||
|
select = {
|
||||||
|
enable = true,
|
||||||
|
-- Automatically jump forward to textobj, similar to targets.vim
|
||||||
|
lookahead = true,
|
||||||
|
keymaps = {
|
||||||
|
-- You can use the capture groups defined in textobjects.scm
|
||||||
|
['aa'] = '@parameter.outer',
|
||||||
|
['ia'] = '@parameter.inner',
|
||||||
|
['af'] = '@function.outer',
|
||||||
|
['if'] = '@function.inner',
|
||||||
|
['ac'] = '@class.outer',
|
||||||
|
['ic'] = '@class.inner',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
move = {
|
||||||
|
enable = true,
|
||||||
|
set_jumps = true, -- whether to set jumps in the jumplist
|
||||||
|
goto_next_start = {
|
||||||
|
[']m'] = '@function.outer',
|
||||||
|
[']]'] = '@class.outer',
|
||||||
|
},
|
||||||
|
goto_next_end = {
|
||||||
|
[']M'] = '@function.outer',
|
||||||
|
[']['] = '@class.outer',
|
||||||
|
},
|
||||||
|
goto_previous_start = {
|
||||||
|
['[m'] = '@function.outer',
|
||||||
|
['[['] = '@class.outer',
|
||||||
|
},
|
||||||
|
goto_previous_end = {
|
||||||
|
['[M'] = '@function.outer',
|
||||||
|
['[]'] = '@class.outer',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
swap = {
|
||||||
|
enable = true,
|
||||||
|
swap_next = {
|
||||||
|
['<leader>a'] = '@parameter.inner',
|
||||||
|
},
|
||||||
|
swap_previous = {
|
||||||
|
['<leader>A'] = '@parameter.inner',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
require('orgmode').setup({
|
||||||
|
org_agenda_files = {
|
||||||
|
'~/Library/Mobile Documents/iCloud~md~obsidian/Documents/_nvalt/**/*',
|
||||||
|
'~/.dotfiles/local/org/**/*'
|
||||||
|
},
|
||||||
|
org_default_notes_file = '~/Library/Mobile Documents/iCloud~md~obsidian/Documents/_nvalt/refile.org',
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Diagnostic keymaps
|
||||||
|
vim.keymap.set('n', 'dz', vim.diagnostic.goto_prev)
|
||||||
|
vim.keymap.set('n', 'dx', vim.diagnostic.goto_next)
|
||||||
|
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float)
|
||||||
|
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist)
|
||||||
|
|
||||||
|
-- LSP settings.
|
||||||
|
-- This function gets run when an LSP connects to a particular buffer.
|
||||||
|
local on_attach = function(_, bufnr)
|
||||||
|
-- NOTE: Remember that lua is a real programming language,
|
||||||
|
-- and as such it is possible to define small helper and
|
||||||
|
-- utility functions so you don't have to repeat yourself
|
||||||
|
-- many times.
|
||||||
|
--
|
||||||
|
-- In this case, we create a function that lets us more
|
||||||
|
-- easily define mappings specific for LSP related items.
|
||||||
|
-- It sets the mode, buffer and description for us each time.
|
||||||
|
local nmap = function(keys, func, desc)
|
||||||
|
if desc then
|
||||||
|
desc = 'LSP: ' .. desc
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.keymap.set('n', keys, func, { buffer = bufnr, desc = desc })
|
||||||
|
end
|
||||||
|
|
||||||
|
nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
|
||||||
|
nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
|
||||||
|
|
||||||
|
nmap('gd', vim.lsp.buf.definition, '[G]oto [D]efinition')
|
||||||
|
nmap('gr', require('telescope.builtin').lsp_references,
|
||||||
|
'[G]oto [R]eferences')
|
||||||
|
nmap('gI', vim.lsp.buf.implementation, '[G]oto [I]mplementation')
|
||||||
|
nmap('<leader>D', vim.lsp.buf.type_definition, 'Type [D]efinition')
|
||||||
|
nmap('<leader>ds', require('telescope.builtin').lsp_document_symbols,
|
||||||
|
'[D]ocument [S]ymbols')
|
||||||
|
nmap('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols,
|
||||||
|
'[W]orkspace [S]ymbols')
|
||||||
|
|
||||||
|
-- See `:help K` for why this keymap
|
||||||
|
nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
|
||||||
|
nmap('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation')
|
||||||
|
|
||||||
|
-- Lesser used LSP functionality
|
||||||
|
nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
||||||
|
nmap('<leader>wa', vim.lsp.buf.add_workspace_folder,
|
||||||
|
'[W]orkspace [A]dd Folder')
|
||||||
|
nmap('<leader>wr', vim.lsp.buf.remove_workspace_folder,
|
||||||
|
'[W]orkspace [R]emove Folder')
|
||||||
|
nmap('<leader>wl', function()
|
||||||
|
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||||
|
end, '[W]orkspace [L]ist Folders')
|
||||||
|
|
||||||
|
-- Create a command `:Format` local to the LSP buffer
|
||||||
|
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
|
||||||
|
if vim.lsp.buf.format then
|
||||||
|
vim.lsp.buf.format()
|
||||||
|
elseif vim.lsp.buf.formatting then
|
||||||
|
vim.lsp.buf.formatting()
|
||||||
|
end
|
||||||
|
end, { desc = 'Format current buffer with LSP' })
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Setup mason so it can manage external tooling
|
||||||
|
require('mason').setup()
|
||||||
|
|
||||||
|
-- Enable the following language servers.
|
||||||
|
-- Feel free to add/remove any LSPs that you want here.
|
||||||
|
-- They will automatically be installed.
|
||||||
|
-- https://github.com/williamboman/mason-lspconfig.nvim#available-lsp-servers
|
||||||
|
local servers = {
|
||||||
|
-- a
|
||||||
|
'angularls',
|
||||||
|
'ansiblels',
|
||||||
|
-- b
|
||||||
|
'bashls',
|
||||||
|
-- c
|
||||||
|
'clangd',
|
||||||
|
'cssls',
|
||||||
|
-- d
|
||||||
|
'dockerls',
|
||||||
|
-- e
|
||||||
|
'eslint',
|
||||||
|
'emmet_ls',
|
||||||
|
-- f
|
||||||
|
-- g
|
||||||
|
'gopls',
|
||||||
|
'graphql',
|
||||||
|
-- h
|
||||||
|
'html',
|
||||||
|
-- i
|
||||||
|
-- j
|
||||||
|
'quick_lint_js', -- js
|
||||||
|
'jsonls',
|
||||||
|
-- k
|
||||||
|
-- l
|
||||||
|
'sumneko_lua', -- lua
|
||||||
|
-- m
|
||||||
|
'marksman', -- markdown
|
||||||
|
-- n
|
||||||
|
-- o
|
||||||
|
'spectral', --openapi
|
||||||
|
-- p
|
||||||
|
'intelephense', 'phpactor', 'psalm',
|
||||||
|
'pyright',
|
||||||
|
-- q
|
||||||
|
-- r
|
||||||
|
'rust_analyzer',
|
||||||
|
-- s
|
||||||
|
'sqlls',
|
||||||
|
'stylelint_lsp',
|
||||||
|
-- t
|
||||||
|
'tailwindcss',
|
||||||
|
'terraformls',
|
||||||
|
'tflint',
|
||||||
|
'tsserver',
|
||||||
|
-- u
|
||||||
|
-- v / w
|
||||||
|
'volar', -- vue
|
||||||
|
'vuels', -- vue
|
||||||
|
-- x / y / z
|
||||||
|
'lemminx', -- xml
|
||||||
|
'yamlls', -- yaml
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Ensure the servers above are installed
|
||||||
|
require('mason-lspconfig').setup {
|
||||||
|
ensure_installed = servers,
|
||||||
|
}
|
||||||
|
|
||||||
|
require("mason-lspconfig").setup_handlers {
|
||||||
|
-- The first entry (without a key) will be the default handler
|
||||||
|
-- and will be called for each installed server that doesn't have
|
||||||
|
-- a dedicated handler.
|
||||||
|
function (server_name) -- default handler (optional)
|
||||||
|
require("lspconfig")[server_name].setup {}
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
-- nvim-cmp supports additional completion capabilities
|
||||||
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
||||||
|
|
||||||
|
for _, lsp in ipairs(servers) do
|
||||||
|
require('lspconfig')[lsp].setup {
|
||||||
|
on_attach = on_attach,
|
||||||
|
capabilities = capabilities,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Turn on lsp status information
|
||||||
|
require('fidget').setup()
|
||||||
|
|
||||||
|
-- Example custom configuration for lua
|
||||||
|
--
|
||||||
|
-- Make runtime files discoverable to the server
|
||||||
|
local runtime_path = vim.split(package.path, ';')
|
||||||
|
table.insert(runtime_path, 'lua/?.lua')
|
||||||
|
table.insert(runtime_path, 'lua/?/init.lua')
|
||||||
|
|
||||||
|
require('lspconfig').sumneko_lua.setup {
|
||||||
|
on_attach = on_attach,
|
||||||
|
capabilities = capabilities,
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
runtime = {
|
||||||
|
-- Tell the language server which version of Lua you're
|
||||||
|
-- using (most likely LuaJIT)
|
||||||
|
version = 'LuaJIT',
|
||||||
|
-- Setup your lua path
|
||||||
|
path = runtime_path,
|
||||||
|
},
|
||||||
|
diagnostics = {
|
||||||
|
globals = { 'vim' },
|
||||||
|
},
|
||||||
|
workspace = {
|
||||||
|
library = vim.api.nvim_get_runtime_file('', true),
|
||||||
|
checkThirdParty = false,
|
||||||
|
},
|
||||||
|
-- Do not send telemetry data containing a randomized
|
||||||
|
-- but unique identifier
|
||||||
|
telemetry = { enable = false },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- nvim-cmp setup
|
||||||
|
local cmp = require 'cmp'
|
||||||
|
local luasnip = require 'luasnip'
|
||||||
|
|
||||||
|
cmp.setup {
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
luasnip.lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
mapping = cmp.mapping.preset.insert {
|
||||||
|
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||||
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
|
['<CR>'] = cmp.mapping.confirm {
|
||||||
|
behavior = cmp.ConfirmBehavior.Replace,
|
||||||
|
select = true,
|
||||||
|
},
|
||||||
|
['<Tab>'] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_next_item()
|
||||||
|
elseif luasnip.expand_or_jumpable() then
|
||||||
|
luasnip.expand_or_jump()
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { 'i', 's' }),
|
||||||
|
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
|
elseif luasnip.jumpable(-1) then
|
||||||
|
luasnip.jump(-1)
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { 'i', 's' }),
|
||||||
|
},
|
||||||
|
sources = {
|
||||||
|
{ name = 'nvim_lsp' },
|
||||||
|
{ name = 'luasnip' },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- barbar keymaps
|
||||||
|
local map = vim.api.nvim_set_keymap
|
||||||
|
local opts = { noremap = true, silent = true }
|
||||||
|
|
||||||
|
-- Move to previous/next
|
||||||
|
map('n', '<C-,>', '<Cmd>BufferPrevious<CR>', opts)
|
||||||
|
map('n', '<C-.>', '<Cmd>BufferNext<CR>', opts)
|
||||||
|
-- Re-order to previous/next
|
||||||
|
map('n', '<C-<>', '<Cmd>BufferMovePrevious<CR>', opts)
|
||||||
|
map('n', '<C->>', '<Cmd>BufferMoveNext<CR>', opts)
|
||||||
|
-- Goto buffer in position...
|
||||||
|
map('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', opts)
|
||||||
|
map('n', '<A-2>', '<Cmd>BufferGoto 2<CR>', opts)
|
||||||
|
map('n', '<A-3>', '<Cmd>BufferGoto 3<CR>', opts)
|
||||||
|
map('n', '<A-4>', '<Cmd>BufferGoto 4<CR>', opts)
|
||||||
|
map('n', '<A-5>', '<Cmd>BufferGoto 5<CR>', opts)
|
||||||
|
map('n', '<A-6>', '<Cmd>BufferGoto 6<CR>', opts)
|
||||||
|
map('n', '<A-7>', '<Cmd>BufferGoto 7<CR>', opts)
|
||||||
|
map('n', '<A-8>', '<Cmd>BufferGoto 8<CR>', opts)
|
||||||
|
map('n', '<A-9>', '<Cmd>BufferGoto 9<CR>', opts)
|
||||||
|
map('n', '<A-0>', '<Cmd>BufferLast<CR>', opts)
|
||||||
|
-- Pin/unpin buffer
|
||||||
|
map('n', '<A-p>', '<Cmd>BufferPin<CR>', opts)
|
||||||
|
-- Close buffer
|
||||||
|
map('n', '<A-c>', '<Cmd>BufferClose<CR>', opts)
|
||||||
|
-- Wipeout buffer
|
||||||
|
-- :BufferWipeout
|
||||||
|
-- Close commands
|
||||||
|
-- :BufferCloseAllButCurrent
|
||||||
|
-- :BufferCloseAllButPinned
|
||||||
|
-- :BufferCloseAllButCurrentOrPinned
|
||||||
|
-- :BufferCloseBuffersLeft
|
||||||
|
-- :BufferCloseBuffersRight
|
||||||
|
-- Magic buffer-picking mode
|
||||||
|
map('n', '<C-p>', '<Cmd>BufferPick<CR>', opts)
|
||||||
|
-- Sort automatically by...
|
||||||
|
map('n', '<Space>bb', '<Cmd>BufferOrderByBufferNumber<CR>', opts)
|
||||||
|
map('n', '<Space>bd', '<Cmd>BufferOrderByDirectory<CR>', opts)
|
||||||
|
map('n', '<Space>bl', '<Cmd>BufferOrderByLanguage<CR>', opts)
|
||||||
|
map('n', '<Space>bw', '<Cmd>BufferOrderByWindowNumber<CR>', opts)
|
||||||
|
|
||||||
|
-- Other:
|
||||||
|
-- :BarbarEnable - enables barbar (enabled by default)
|
||||||
|
-- :BarbarDisable - very bad command, should never be used
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("BufWritePost",
|
||||||
|
{ pattern = "plugins.lua", command = "source <afile> | PackerSync" })
|
||||||
|
vim.api.nvim_create_autocmd("BufRead",
|
||||||
|
{ pattern = "*/node_modules/*", command = "lua vim.diagnostic.disable(0)" })
|
||||||
|
vim.api.nvim_create_autocmd("BufNewFile",
|
||||||
|
{ pattern = "*/node_modules/*", command = "lua vim.diagnostic.disable(0)" })
|
||||||
|
-- Enable spell checking for certain file types
|
||||||
|
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" },
|
||||||
|
{ pattern = { "*.txt", "*.md", "*.tex" },
|
||||||
|
command = "setlocal spell" })
|
||||||
|
|
||||||
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
74
config/nvim/lua/custom/plugins.lua
Normal file
74
config/nvim/lua/custom/plugins.lua
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
return function(use)
|
||||||
|
|
||||||
|
-- 💥 Create key bindings that stick.
|
||||||
|
-- WhichKey is a lua plugin that displays a popup with
|
||||||
|
-- possible keybindings of the command you started typing.
|
||||||
|
use({ "folke/which-key.nvim", config = function() require("which-key").setup({}) end })
|
||||||
|
|
||||||
|
-- 🍨 Soothing pastel theme for (Neo)vim
|
||||||
|
-- https://github.com/catppuccin/nvim
|
||||||
|
-- use { "catppuccin/nvim", as = "catppuccin" }
|
||||||
|
-- vim.cmd.colorscheme('catppuccin-latte')
|
||||||
|
|
||||||
|
-- markdown preview plugin for (neo)vim
|
||||||
|
-- https://github.com/iamcco/markdown-preview.nvim
|
||||||
|
use({ "iamcco/markdown-preview.nvim",
|
||||||
|
run = function() vim.fn["mkdp#util#install"]() end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- The neovim tabline plugin.
|
||||||
|
-- https://github.com/romgrk/barbar.nvim
|
||||||
|
use 'nvim-tree/nvim-web-devicons'
|
||||||
|
use { 'romgrk/barbar.nvim', wants = 'nvim-web-devicons' }
|
||||||
|
|
||||||
|
-- Pretty UI
|
||||||
|
use 'stevearc/dressing.nvim' -- Neovim plugin to improve the default vim.ui interfaces
|
||||||
|
use 'rcarriga/nvim-notify' -- A fancy, configurable, notification manager for NeoVim
|
||||||
|
use 'vigoux/notifier.nvim' -- Non-intrusive notification system for neovim
|
||||||
|
use { 'folke/todo-comments.nvim', -- ✅ Highlight, list and search todo comments in your projects
|
||||||
|
requires = 'nvim-lua/plenary.nvim',
|
||||||
|
config = function() require('todo-comments').setup {} end,
|
||||||
|
}
|
||||||
|
|
||||||
|
-- The Refactoring library based off the Refactoring book by Martin Fowler
|
||||||
|
-- https://github.com/ThePrimeagen/refactoring.nvim
|
||||||
|
use {
|
||||||
|
"ThePrimeagen/refactoring.nvim",
|
||||||
|
requires = {
|
||||||
|
{"nvim-lua/plenary.nvim"},
|
||||||
|
{"nvim-treesitter/nvim-treesitter"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-- An asynchronous linter plugin for Neovim complementary to the built-in Language Server Protocol support.
|
||||||
|
-- https://github.com/mfussenegger/nvim-lint
|
||||||
|
use 'mfussenegger/nvim-lint'
|
||||||
|
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||||
|
callback = function() require("lint").try_lint() end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- nvim orgmode, to get me use nvim even more.
|
||||||
|
use ({ "nvim-orgmode/orgmode",
|
||||||
|
config = function() require("orgmode").setup({}) end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Remaps for the refactoring operations currently offered by the plugin
|
||||||
|
local map = vim.api.nvim_set_keymap
|
||||||
|
local refactoring_opts = { noremap = true, silent = true, expr = false }
|
||||||
|
map("v", "<leader>re", [[ <Esc><Cmd>lua require('refactoring').refactor('Extract Function')<CR>]], refactoring_opts)
|
||||||
|
map("v", "<leader>rf", [[ <Esc><Cmd>lua require('refactoring').refactor('Extract Function To File')<CR>]], refactoring_opts)
|
||||||
|
map("v", "<leader>rv", [[ <Esc><Cmd>lua require('refactoring').refactor('Extract Variable')<CR>]], refactoring_opts)
|
||||||
|
map("v", "<leader>ri", [[ <Esc><Cmd>lua require('refactoring').refactor('Inline Variable')<CR>]], refactoring_opts)
|
||||||
|
|
||||||
|
-- Extract block doesn't need visual mode
|
||||||
|
map("n", "<leader>rb", [[ <Cmd>lua require('refactoring').refactor('Extract Block')<CR>]], refactoring_opts)
|
||||||
|
map("n", "<leader>rbf", [[ <Cmd>lua require('refactoring').refactor('Extract Block To File')<CR>]], refactoring_opts)
|
||||||
|
|
||||||
|
-- Inline variable can also pick up the identifier currently under the cursor without visual mode
|
||||||
|
map("n", "<leader>ri", [[ <Cmd>lua require('refactoring').refactor('Inline Variable')<CR>]],refactoring_opts)
|
||||||
|
|
||||||
|
-- prompt for a refactor to apply when the remap is triggered
|
||||||
|
map("v", "<leader>rr", ":lua require('refactoring').select_refactor()<CR>", refactoring_opts)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
294
config/nvim/plugin/packer_compiled.lua
Normal file
294
config/nvim/plugin/packer_compiled.lua
Normal file
@@ -0,0 +1,294 @@
|
|||||||
|
-- Automatically generated packer.nvim plugin loader code
|
||||||
|
|
||||||
|
if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
|
||||||
|
vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_command('packadd packer.nvim')
|
||||||
|
|
||||||
|
local no_errors, error_msg = pcall(function()
|
||||||
|
|
||||||
|
_G._packer = _G._packer or {}
|
||||||
|
_G._packer.inside_compile = true
|
||||||
|
|
||||||
|
local time
|
||||||
|
local profile_info
|
||||||
|
local should_profile = false
|
||||||
|
if should_profile then
|
||||||
|
local hrtime = vim.loop.hrtime
|
||||||
|
profile_info = {}
|
||||||
|
time = function(chunk, start)
|
||||||
|
if start then
|
||||||
|
profile_info[chunk] = hrtime()
|
||||||
|
else
|
||||||
|
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
time = function(chunk, start) end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function save_profiles(threshold)
|
||||||
|
local sorted_times = {}
|
||||||
|
for chunk_name, time_taken in pairs(profile_info) do
|
||||||
|
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
|
||||||
|
end
|
||||||
|
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
|
||||||
|
local results = {}
|
||||||
|
for i, elem in ipairs(sorted_times) do
|
||||||
|
if not threshold or threshold and elem[2] > threshold then
|
||||||
|
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if threshold then
|
||||||
|
table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)')
|
||||||
|
end
|
||||||
|
|
||||||
|
_G._packer.profile_output = results
|
||||||
|
end
|
||||||
|
|
||||||
|
time([[Luarocks path setup]], true)
|
||||||
|
local package_path_str = "/Users/ivuorinen/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/Users/ivuorinen/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/Users/ivuorinen/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/Users/ivuorinen/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
|
||||||
|
local install_cpath_pattern = "/Users/ivuorinen/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
|
||||||
|
if not string.find(package.path, package_path_str, 1, true) then
|
||||||
|
package.path = package.path .. ';' .. package_path_str
|
||||||
|
end
|
||||||
|
|
||||||
|
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
|
||||||
|
package.cpath = package.cpath .. ';' .. install_cpath_pattern
|
||||||
|
end
|
||||||
|
|
||||||
|
time([[Luarocks path setup]], false)
|
||||||
|
time([[try_loadstring definition]], true)
|
||||||
|
local function try_loadstring(s, component, name)
|
||||||
|
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
|
||||||
|
if not success then
|
||||||
|
vim.schedule(function()
|
||||||
|
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
|
time([[try_loadstring definition]], false)
|
||||||
|
time([[Defining packer_plugins]], true)
|
||||||
|
_G.packer_plugins = {
|
||||||
|
["Comment.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/Comment.nvim",
|
||||||
|
url = "https://github.com/numToStr/Comment.nvim"
|
||||||
|
},
|
||||||
|
LuaSnip = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/LuaSnip",
|
||||||
|
url = "https://github.com/L3MON4D3/LuaSnip"
|
||||||
|
},
|
||||||
|
["barbar.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/barbar.nvim",
|
||||||
|
url = "https://github.com/romgrk/barbar.nvim",
|
||||||
|
wants = { "nvim-web-devicons" }
|
||||||
|
},
|
||||||
|
catppuccin = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/catppuccin",
|
||||||
|
url = "https://github.com/catppuccin/nvim"
|
||||||
|
},
|
||||||
|
["cmp-nvim-lsp"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
|
||||||
|
},
|
||||||
|
cmp_luasnip = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/cmp_luasnip",
|
||||||
|
url = "https://github.com/saadparwaiz1/cmp_luasnip"
|
||||||
|
},
|
||||||
|
["dressing.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/dressing.nvim",
|
||||||
|
url = "https://github.com/stevearc/dressing.nvim"
|
||||||
|
},
|
||||||
|
["fidget.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/fidget.nvim",
|
||||||
|
url = "https://github.com/j-hui/fidget.nvim"
|
||||||
|
},
|
||||||
|
["gitsigns.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/gitsigns.nvim",
|
||||||
|
url = "https://github.com/lewis6991/gitsigns.nvim"
|
||||||
|
},
|
||||||
|
["indent-blankline.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim",
|
||||||
|
url = "https://github.com/lukas-reineke/indent-blankline.nvim"
|
||||||
|
},
|
||||||
|
["lualine.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/lualine.nvim",
|
||||||
|
url = "https://github.com/nvim-lualine/lualine.nvim"
|
||||||
|
},
|
||||||
|
["markdown-preview.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/markdown-preview.nvim",
|
||||||
|
url = "https://github.com/iamcco/markdown-preview.nvim"
|
||||||
|
},
|
||||||
|
["mason-lspconfig.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
|
||||||
|
url = "https://github.com/williamboman/mason-lspconfig.nvim"
|
||||||
|
},
|
||||||
|
["mason.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/mason.nvim",
|
||||||
|
url = "https://github.com/williamboman/mason.nvim"
|
||||||
|
},
|
||||||
|
["notifier.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/notifier.nvim",
|
||||||
|
url = "https://github.com/vigoux/notifier.nvim"
|
||||||
|
},
|
||||||
|
["nvim-cmp"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/nvim-cmp",
|
||||||
|
url = "https://github.com/hrsh7th/nvim-cmp"
|
||||||
|
},
|
||||||
|
["nvim-lint"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/nvim-lint",
|
||||||
|
url = "https://github.com/mfussenegger/nvim-lint"
|
||||||
|
},
|
||||||
|
["nvim-lspconfig"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
|
||||||
|
url = "https://github.com/neovim/nvim-lspconfig"
|
||||||
|
},
|
||||||
|
["nvim-notify"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/nvim-notify",
|
||||||
|
url = "https://github.com/rcarriga/nvim-notify"
|
||||||
|
},
|
||||||
|
["nvim-treesitter"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
|
||||||
|
url = "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||||
|
},
|
||||||
|
["nvim-treesitter-textobjects"] = {
|
||||||
|
load_after = {},
|
||||||
|
loaded = true,
|
||||||
|
needs_bufread = false,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/opt/nvim-treesitter-textobjects",
|
||||||
|
url = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects"
|
||||||
|
},
|
||||||
|
["nvim-web-devicons"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
|
||||||
|
url = "https://github.com/nvim-tree/nvim-web-devicons"
|
||||||
|
},
|
||||||
|
orgmode = {
|
||||||
|
config = { "\27LJ\2\n9\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\forgmode\frequire\0" },
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/orgmode",
|
||||||
|
url = "https://github.com/nvim-orgmode/orgmode"
|
||||||
|
},
|
||||||
|
["packer.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/packer.nvim",
|
||||||
|
url = "https://github.com/wbthomason/packer.nvim"
|
||||||
|
},
|
||||||
|
["palenight.vim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/palenight.vim",
|
||||||
|
url = "https://github.com/drewtempelmeyer/palenight.vim"
|
||||||
|
},
|
||||||
|
["plenary.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/plenary.nvim",
|
||||||
|
url = "https://github.com/nvim-lua/plenary.nvim"
|
||||||
|
},
|
||||||
|
["refactoring.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/refactoring.nvim",
|
||||||
|
url = "https://github.com/ThePrimeagen/refactoring.nvim"
|
||||||
|
},
|
||||||
|
["telescope-fzf-native.nvim"] = {
|
||||||
|
cond = { true },
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
only_cond = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/opt/telescope-fzf-native.nvim",
|
||||||
|
url = "https://github.com/nvim-telescope/telescope-fzf-native.nvim"
|
||||||
|
},
|
||||||
|
["telescope.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
||||||
|
url = "https://github.com/nvim-telescope/telescope.nvim"
|
||||||
|
},
|
||||||
|
["todo-comments.nvim"] = {
|
||||||
|
config = { "\27LJ\2\n?\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\18todo-comments\frequire\0" },
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/todo-comments.nvim",
|
||||||
|
url = "https://github.com/folke/todo-comments.nvim"
|
||||||
|
},
|
||||||
|
["vim-fugitive"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/vim-fugitive",
|
||||||
|
url = "https://github.com/tpope/vim-fugitive"
|
||||||
|
},
|
||||||
|
["vim-rhubarb"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/vim-rhubarb",
|
||||||
|
url = "https://github.com/tpope/vim-rhubarb"
|
||||||
|
},
|
||||||
|
["vim-sleuth"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/vim-sleuth",
|
||||||
|
url = "https://github.com/tpope/vim-sleuth"
|
||||||
|
},
|
||||||
|
["which-key.nvim"] = {
|
||||||
|
config = { "\27LJ\2\n;\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\14which-key\frequire\0" },
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/which-key.nvim",
|
||||||
|
url = "https://github.com/folke/which-key.nvim"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
time([[Defining packer_plugins]], false)
|
||||||
|
-- Config for: orgmode
|
||||||
|
time([[Config for orgmode]], true)
|
||||||
|
try_loadstring("\27LJ\2\n9\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\forgmode\frequire\0", "config", "orgmode")
|
||||||
|
time([[Config for orgmode]], false)
|
||||||
|
-- Config for: todo-comments.nvim
|
||||||
|
time([[Config for todo-comments.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\n?\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\18todo-comments\frequire\0", "config", "todo-comments.nvim")
|
||||||
|
time([[Config for todo-comments.nvim]], false)
|
||||||
|
-- Config for: which-key.nvim
|
||||||
|
time([[Config for which-key.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\n;\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\14which-key\frequire\0", "config", "which-key.nvim")
|
||||||
|
time([[Config for which-key.nvim]], false)
|
||||||
|
-- Conditional loads
|
||||||
|
time([[Conditional loading of telescope-fzf-native.nvim]], true)
|
||||||
|
require("packer.load")({"telescope-fzf-native.nvim"}, {}, _G.packer_plugins)
|
||||||
|
time([[Conditional loading of telescope-fzf-native.nvim]], false)
|
||||||
|
-- Load plugins in order defined by `after`
|
||||||
|
time([[Sequenced loading]], true)
|
||||||
|
vim.cmd [[ packadd nvim-treesitter ]]
|
||||||
|
vim.cmd [[ packadd nvim-treesitter-textobjects ]]
|
||||||
|
time([[Sequenced loading]], false)
|
||||||
|
|
||||||
|
_G._packer.inside_compile = false
|
||||||
|
if _G._packer.needs_bufread == true then
|
||||||
|
vim.cmd("doautocmd BufRead")
|
||||||
|
end
|
||||||
|
_G._packer.needs_bufread = false
|
||||||
|
|
||||||
|
if should_profile then save_profiles() end
|
||||||
|
|
||||||
|
end)
|
||||||
|
|
||||||
|
if not no_errors then
|
||||||
|
error_msg = error_msg:gsub('"', '\\"')
|
||||||
|
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
|
||||||
|
end
|
||||||
53
config/tmux/tmux.conf
Normal file
53
config/tmux/tmux.conf
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
# ~/.config/tmux/tmux.conf, or .dotfiles/config/tmux/tmux.conf
|
||||||
|
#
|
||||||
|
# Contains configuration from the follwing sources:
|
||||||
|
# - https://tmuxguide.readthedocs.io/en/latest/tmux/tmux.html
|
||||||
|
# -
|
||||||
|
|
||||||
|
# unbind default prefix and set it to ctrl-a
|
||||||
|
unbind C-b
|
||||||
|
set -g prefix C-a
|
||||||
|
bind C-a send-prefix
|
||||||
|
|
||||||
|
# make delay shorter
|
||||||
|
set -sg escape-time 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### key bindings ####
|
||||||
|
|
||||||
|
# reload config file
|
||||||
|
bind r source-file ~/.dotfiles/config/tmux/tmux.conf \; display "tmux.conf reloaded!"
|
||||||
|
|
||||||
|
# quickly open a new window
|
||||||
|
bind N new-window
|
||||||
|
|
||||||
|
# synchronize all panes in a window
|
||||||
|
bind y setw synchronize-panes
|
||||||
|
|
||||||
|
# pane movement shortcuts (same as vim)
|
||||||
|
bind h select-pane -L
|
||||||
|
bind j select-pane -D
|
||||||
|
bind k select-pane -U
|
||||||
|
bind l select-pane -R
|
||||||
|
|
||||||
|
# enable mouse support for switching panes/windows
|
||||||
|
#set -g mouse-utf8 on
|
||||||
|
#set -g mouse on
|
||||||
|
|
||||||
|
#### copy mode : vim ####
|
||||||
|
|
||||||
|
# set vi mode for copy mode
|
||||||
|
setw -g mode-keys vi
|
||||||
|
|
||||||
|
# copy mode using 'Esc'
|
||||||
|
unbind [
|
||||||
|
bind Escape copy-mode
|
||||||
|
|
||||||
|
# start selection with 'space' and copy using 'y'
|
||||||
|
#bind -t vi-copy 'y' copy-selection
|
||||||
|
|
||||||
|
# paste using 'p'
|
||||||
|
unbind p
|
||||||
|
bind p paste-buffer
|
||||||
|
|
||||||
@@ -9,12 +9,12 @@
|
|||||||
# Helper variables, override with ENVs like `VERBOSE=1 dfm help`
|
# Helper variables, override with ENVs like `VERBOSE=1 dfm help`
|
||||||
: "${VERBOSE:=0}"
|
: "${VERBOSE:=0}"
|
||||||
: "${DOTFILES:=$HOME/.dotfiles}"
|
: "${DOTFILES:=$HOME/.dotfiles}"
|
||||||
: "${INSTALL_SCRIPT:=$DOTFILES/scripts/install.sh}"
|
: "${INSTALL_SCRIPT:=$DOTFILES/scripts/install-dotfiles.sh}"
|
||||||
: "${BREWFILE:=$DOTFILES/Brewfile}"
|
: "${BREWFILE:=$DOTFILES/Brewfile}"
|
||||||
|
|
||||||
SCRIPT=$(basename "$0")
|
SCRIPT=$(basename "$0")
|
||||||
|
|
||||||
source "$HOME/.dotfiles/scripts/shared.sh"
|
source "$DOTFILES/scripts/shared.sh"
|
||||||
|
|
||||||
function section_install
|
function section_install
|
||||||
{
|
{
|
||||||
@@ -22,27 +22,39 @@ function section_install
|
|||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
all)
|
all)
|
||||||
bash "$DOTFILES/scripts/settler.sh" && msg_done "🎉 Done!"
|
$0 install antigen && msg_done "New antigen installed"
|
||||||
|
$0 install macos && msg_done "macOS Defaults set"
|
||||||
|
$0 install brew && msg_done "Brewfile defined apps has been installed"
|
||||||
|
$0 install ext_gh && msg_done "Extensions for GitHub CLI have been installed"
|
||||||
|
$0 install ext_go && msg_done "Go packages have been installed"
|
||||||
;;
|
;;
|
||||||
antigen)
|
antigen)
|
||||||
curl -L git.io/antigen > "$DOTFILES/local/bin/antigen.zsh" && msg_done "🎉 Done!"
|
curl -L git.io/antigen > "$DOTFILES/local/bin/antigen.zsh" && msg_done "🎉 Done!"
|
||||||
;;
|
;;
|
||||||
defaults)
|
brew)
|
||||||
bash "$DOTFILES/scripts/set-defaults.sh" && msg_done "🎉 Done!"
|
brew bundle install --file="$BREWFILE" && msg_done "🎉 Done!"
|
||||||
|
;;
|
||||||
|
macos)
|
||||||
|
bash "$DOTFILES/scripts/set-macos-defaults.sh" && msg_done "🎉 Done!"
|
||||||
;;
|
;;
|
||||||
ext_go)
|
ext_go)
|
||||||
bash "$DOTFILES/scripts/install-go-packages" && msg_done "🎉 Done!"
|
bash "$DOTFILES/scripts/install-go-packages.sh" && msg_done "🎉 Done!"
|
||||||
;;
|
;;
|
||||||
ext_gh)
|
ext_gh)
|
||||||
bash "$DOTFILES/scripts/install-gh-extensions" && msg_done "🎉 Done!"
|
bash "$DOTFILES/scripts/install-gh-extensions.sh" && msg_done "🎉 Done!"
|
||||||
|
;;
|
||||||
|
settler)
|
||||||
|
bash "$DOTFILES/scripts/settler.sh" && msg_done "🎉 Done!"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
menu_section "$USAGE_PREFIX" "all | antigen | defaults | ext_go | ext_gh"
|
menu_section "$USAGE_PREFIX" "all | antigen | brew | macos | ext_go | ext_gh | settler"
|
||||||
menu_item "all" "Runs the WIP settler.sh"
|
menu_item "all" "Installs antigen, macos, brew, ext_gh and ext_go"
|
||||||
menu_item "antigen" "Updates the antigen.zsh file"
|
menu_item "antigen" "Updates the antigen.zsh file"
|
||||||
menu_item "defaults" "Setup nice macOS defaults"
|
menu_item "brew" "Install Brewfile contents"
|
||||||
menu_item "ext_go" "Install Go Packages"
|
|
||||||
menu_item "ext_gh" "Install GitHub CLI Extensions"
|
menu_item "ext_gh" "Install GitHub CLI Extensions"
|
||||||
|
menu_item "ext_go" "Install Go Packages"
|
||||||
|
menu_item "macos" "Setup nice macOS defaults"
|
||||||
|
menu_item "settler" "Runs the WIP settler.sh"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@@ -58,19 +70,18 @@ function section_brew
|
|||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
install)
|
install)
|
||||||
brew bundle install --file="$BREWFILE"
|
brew bundle install --file="$BREWFILE" && msg_done "🎉 Done!"
|
||||||
echo "🎉 Done!"
|
|
||||||
;;
|
;;
|
||||||
update)
|
update)
|
||||||
brew update && brew outdated && brew upgrade && brew cleanup
|
brew update && brew outdated && brew upgrade && brew cleanup
|
||||||
echo "🎉 Done!"
|
msg_done "🎉 Done!"
|
||||||
;;
|
;;
|
||||||
updatebundle)
|
updatebundle)
|
||||||
# Updates .dotfiles/Brewfile with descriptions
|
# Updates .dotfiles/Brewfile with descriptions
|
||||||
brew bundle dump \
|
brew bundle dump \
|
||||||
--force \
|
--force \
|
||||||
--file="$BREWFILE" \
|
--file="$BREWFILE" \
|
||||||
--describe && msg_ok "🎉 Done!"
|
--describe && msg_done "🎉 Done!"
|
||||||
;;
|
;;
|
||||||
autoupdate)
|
autoupdate)
|
||||||
brew autoupdate start 43200 --upgrade --cleanup --immediate
|
brew autoupdate start 43200 --upgrade --cleanup --immediate
|
||||||
@@ -91,15 +102,16 @@ function section_dotfiles
|
|||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
link)
|
link)
|
||||||
rcup -B "$HOSTNAME" -f -v && echo "🎉 Done!"
|
rcup -B "$HOSTNAME" -f -v && msg_done "🎉 Done!"
|
||||||
;;
|
;;
|
||||||
update)
|
update)
|
||||||
# Updates .dotfiles/scripts/install.sh and formats it
|
# Updates .dotfiles/scripts/install.sh and formats it
|
||||||
rcup -B 0 -g \
|
rcup -B 0 -g \
|
||||||
| tee "$INSTALL_SCRIPT" 1> /dev/null \
|
| tee "$INSTALL_SCRIPT" 1> /dev/null \
|
||||||
&& sed -i '' "s|$HOME|\$HOME|g" "$INSTALL_SCRIPT"
|
&& sed -i '' "s|$HOME|\$HOME|g" "$INSTALL_SCRIPT" \
|
||||||
|
&& sed -i '' "s|install.sh|$(basename $INSTALL_SCRIPT)|g" "$INSTALL_SCRIPT"
|
||||||
$0 dotfiles shfmt
|
$0 dotfiles shfmt
|
||||||
echo "🎉 Done!"
|
msg_done "🎉 Done!"
|
||||||
;;
|
;;
|
||||||
shfmt)
|
shfmt)
|
||||||
# Format shell scripts according to following rules.
|
# Format shell scripts according to following rules.
|
||||||
@@ -109,7 +121,6 @@ function section_dotfiles
|
|||||||
--write \
|
--write \
|
||||||
--diff \
|
--diff \
|
||||||
--simplify \
|
--simplify \
|
||||||
--language-dialect bash \
|
|
||||||
--indent 2 \
|
--indent 2 \
|
||||||
--binary-next-line \
|
--binary-next-line \
|
||||||
--case-indent \
|
--case-indent \
|
||||||
@@ -119,9 +130,9 @@ function section_dotfiles
|
|||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
menu_section "$USAGE_PREFIX" "link | update | shfmt"
|
menu_section "$USAGE_PREFIX" "link | update | shfmt"
|
||||||
menu_item "link" "Use rcrc to update dotfile links"
|
menu_item "link" "Use rcrc to update dotfile links"
|
||||||
menu_item "update" "Updates dotfile links, installs host specific overrides automatically"
|
menu_item "update" "Updates dotfile links, installs host specific overrides automatically"
|
||||||
menu_item "shfmt" "Run shfmt to all dotfiles"
|
menu_item "shfmt" "Run shfmt to all dotfiles"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@@ -172,3 +183,4 @@ case "$1" in
|
|||||||
tests) section_tests "$2" ;;
|
tests) section_tests "$2" ;;
|
||||||
*) usage && exit 1 ;;
|
*) usage && exit 1 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
#
|
#
|
||||||
# sh install.sh
|
# sh install-dotfiles.sh
|
||||||
#
|
#
|
||||||
# Environment variables: VERBOSE, CP, LN, MKDIR, RM, DIRNAME.
|
# Environment variables: VERBOSE, CP, LN, MKDIR, RM, DIRNAME.
|
||||||
#
|
#
|
||||||
# env VERBOSE=1 sh install.sh
|
# env VERBOSE=1 sh install-dotfiles.sh
|
||||||
#
|
#
|
||||||
# DO NOT EDIT THIS FILE
|
# DO NOT EDIT THIS FILE
|
||||||
#
|
#
|
||||||
@@ -70,10 +70,16 @@ handle_file_ln "$HOME/.dotfiles/bash_profile" "$HOME/.bash_profile"
|
|||||||
handle_file_ln "$HOME/.dotfiles/bashrc" "$HOME/.bashrc"
|
handle_file_ln "$HOME/.dotfiles/bashrc" "$HOME/.bashrc"
|
||||||
handle_file_ln "$HOME/.dotfiles/config/alias" "$HOME/.config/alias"
|
handle_file_ln "$HOME/.dotfiles/config/alias" "$HOME/.config/alias"
|
||||||
handle_file_ln "$HOME/.dotfiles/config/exports" "$HOME/.config/exports"
|
handle_file_ln "$HOME/.dotfiles/config/exports" "$HOME/.config/exports"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/flipperdevices.com/qFlipper.ini" "$HOME/.config/flipperdevices.com/qFlipper.ini"
|
||||||
handle_file_ln "$HOME/.dotfiles/config/functions" "$HOME/.config/functions"
|
handle_file_ln "$HOME/.dotfiles/config/functions" "$HOME/.config/functions"
|
||||||
handle_file_ln "$HOME/.dotfiles/config/gh/config.yml" "$HOME/.config/gh/config.yml"
|
handle_file_ln "$HOME/.dotfiles/config/gh/config.yml" "$HOME/.config/gh/config.yml"
|
||||||
handle_file_ln "$HOME/.dotfiles/config/git/config" "$HOME/.config/git/config"
|
handle_file_ln "$HOME/.dotfiles/config/git/config" "$HOME/.config/git/config"
|
||||||
handle_file_ln "$HOME/.dotfiles/config/git/gitignore" "$HOME/.config/git/gitignore"
|
handle_file_ln "$HOME/.dotfiles/config/git/gitignore" "$HOME/.config/git/gitignore"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/after/plugin/defaults.lua" "$HOME/.config/nvim/after/plugin/defaults.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/init.lua" "$HOME/.config/nvim/init.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/custom/plugins.lua" "$HOME/.config/nvim/lua/custom/plugins.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/plugin/packer_compiled.lua" "$HOME/.config/nvim/plugin/packer_compiled.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/tmux/tmux.conf" "$HOME/.config/tmux/tmux.conf"
|
||||||
handle_file_ln "$HOME/.dotfiles/config/wtf/config.yml" "$HOME/.config/wtf/config.yml"
|
handle_file_ln "$HOME/.dotfiles/config/wtf/config.yml" "$HOME/.config/wtf/config.yml"
|
||||||
handle_file_ln "$HOME/.dotfiles/git_profiles" "$HOME/.git_profiles"
|
handle_file_ln "$HOME/.dotfiles/git_profiles" "$HOME/.git_profiles"
|
||||||
handle_file_ln "$HOME/.dotfiles/huskyrc" "$HOME/.huskyrc"
|
handle_file_ln "$HOME/.dotfiles/huskyrc" "$HOME/.huskyrc"
|
||||||
16
ssh/config
16
ssh/config
@@ -1,2 +1,16 @@
|
|||||||
|
Host github.com
|
||||||
|
User git
|
||||||
|
HostName github.com
|
||||||
|
IdentityFile ~/.ssh/id_rsa
|
||||||
|
|
||||||
|
Host bitbucket.com
|
||||||
|
Hostname bitbucket.com
|
||||||
|
IdentityFile ~/.ssh/id_rsa
|
||||||
|
|
||||||
|
Host gitlab.com
|
||||||
|
Hostname gitlab.com
|
||||||
|
IdentityFile ~/.ssh/id_rsa
|
||||||
|
|
||||||
Host *
|
Host *
|
||||||
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
|
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
|
||||||
|
|
||||||
|
|||||||
3
vuerc
3
vuerc
@@ -20,4 +20,5 @@
|
|||||||
"cssPreprocessor": "dart-sass"
|
"cssPreprocessor": "dart-sass"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
10
zshrc
10
zshrc
@@ -5,7 +5,7 @@
|
|||||||
autoload -U colors zsh/terminfo
|
autoload -U colors zsh/terminfo
|
||||||
colors
|
colors
|
||||||
|
|
||||||
export PATH="/opt/homebrew/bin:/usr/local/sbin:$PATH"
|
export PATH="/opt/homebrew/opt/ruby/bin:/opt/homebrew/bin:/usr/local/sbin:$PATH"
|
||||||
|
|
||||||
if [ command -v brew &> /dev/null ]; then
|
if [ command -v brew &> /dev/null ]; then
|
||||||
BREW_BIN=$(brew --prefix)/bin
|
BREW_BIN=$(brew --prefix)/bin
|
||||||
@@ -27,6 +27,10 @@ if command -v go &> /dev/null; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if command -v nvim &> /dev/null; then
|
||||||
|
export EDITOR="nvim"
|
||||||
|
fi
|
||||||
|
|
||||||
LOCAL_BIN="$HOME/.local/bin"
|
LOCAL_BIN="$HOME/.local/bin"
|
||||||
COMPOSER_DIR="$HOME/.composer/vendor/bin"
|
COMPOSER_DIR="$HOME/.composer/vendor/bin"
|
||||||
export PATH="$LOCAL_BIN:$COMPOSER_DIR:$PATH"
|
export PATH="$LOCAL_BIN:$COMPOSER_DIR:$PATH"
|
||||||
@@ -68,13 +72,13 @@ if command -v antigen &> /dev/null; then
|
|||||||
antigen bundle zsh-users/zsh-completions
|
antigen bundle zsh-users/zsh-completions
|
||||||
antigen bundle MichaelAquilina/zsh-you-should-use
|
antigen bundle MichaelAquilina/zsh-you-should-use
|
||||||
antigen bundle unixorn/autoupdate-antigen.zshplugin
|
antigen bundle unixorn/autoupdate-antigen.zshplugin
|
||||||
|
antigen bundle Sparragus/zsh-auto-nvm-use
|
||||||
# antigen bundle git-auto-fetch
|
# antigen bundle git-auto-fetch
|
||||||
|
|
||||||
hash php 2>/dev/null && antigen bundle php
|
hash php 2>/dev/null && antigen bundle php
|
||||||
hash nvm 2>/dev/null && antigen bundle nvm
|
hash nvm 2>/dev/null && antigen bundle nvm
|
||||||
hash docker 2>/dev/null && antigen bundle docker
|
hash docker 2>/dev/null && antigen bundle docker
|
||||||
|
hash ruby 2>/dev/null && antigen bundle ruby
|
||||||
hash nvm 2>/dev/null && antigen bundle Sparragus/zsh-auto-nvm-use
|
|
||||||
hash python 2>/dev/null && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
|
hash python 2>/dev/null && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
|
||||||
hash jq 2>/dev/null && antigen bundle reegnz/jq-zsh-plugin
|
hash jq 2>/dev/null && antigen bundle reegnz/jq-zsh-plugin
|
||||||
hash docker-compose 2>/dev/null && antigen bundle sroze/docker-compose-zsh-plugin
|
hash docker-compose 2>/dev/null && antigen bundle sroze/docker-compose-zsh-plugin
|
||||||
|
|||||||
Reference in New Issue
Block a user