commit
496f407ddd
50 changed files with 793 additions and 321 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
configs/nvim/plugin/packer_compiled.lua
|
3
configs/lazygit/config.yml
Normal file
3
configs/lazygit/config.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
git:
|
||||
pull:
|
||||
mode: 'rebase' # one of 'auto' | 'merge' | 'rebase' | 'ff-only', auto reads from git configuration
|
11
configs/nvim/init.lua
Normal file
11
configs/nvim/init.lua
Normal file
|
@ -0,0 +1,11 @@
|
|||
-------------------- HELPERS -------------------------------
|
||||
local helpers = require('helpers')
|
||||
|
||||
-------------------- OPTIONS -------------------------------
|
||||
helpers.call_with_helpers(require('options').init)
|
||||
|
||||
-------------------- PLUGINS -------------------------------
|
||||
helpers.call_with_helpers(require('plugins').init)
|
||||
|
||||
-------------------- MAPPINGS ------------------------------
|
||||
helpers.call_with_helpers(require('mappings').init)
|
|
@ -1,54 +0,0 @@
|
|||
" auto toggle relativenumber
|
||||
set number! relativenumber!
|
||||
augroup numbertoggle
|
||||
autocmd!
|
||||
autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
|
||||
autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
|
||||
augroup END
|
||||
|
||||
" Tab options
|
||||
set tabstop=4 softtabstop=4
|
||||
set shiftwidth=4
|
||||
set expandtab
|
||||
set smartindent
|
||||
|
||||
set signcolumn=yes
|
||||
|
||||
set noerrorbells
|
||||
|
||||
set nobackup
|
||||
set nowrap
|
||||
set undodir=~/.vim/undodir
|
||||
set undofile
|
||||
|
||||
set updatetime=500
|
||||
|
||||
let mapleader = " "
|
||||
|
||||
lua require("adopi")
|
||||
|
||||
" smartsearch
|
||||
set smartcase ignorecase
|
||||
set incsearch
|
||||
|
||||
" toggle nu column
|
||||
augroup vimrc-incsearch-highlight
|
||||
autocmd!
|
||||
autocmd CmdlineEnter /,\? :set hlsearch
|
||||
autocmd CmdlineLeave /,\? :set nohlsearch
|
||||
augroup END
|
||||
|
||||
command! LogPath :lua print(vim.inspect(vim.lsp.get_log_path()))
|
||||
|
||||
nnoremap <leader>ps :lua require('telescope.builtin').grep_string({ search = vim.fn.input("Grep For >")})<cr>
|
||||
|
||||
" Find files using Telescope command-line sugar.
|
||||
nnoremap <leader>ff <cmd>Telescope find_files<cr>
|
||||
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
|
||||
nnoremap <leader>fb <cmd>Telescope buffers<cr>
|
||||
nnoremap <leader>fh <cmd>Telescope help_tags<cr>
|
||||
|
||||
" NvimTreeToggle
|
||||
nnoremap <leader>tt :NvimTreeToggle<cr>
|
||||
nnoremap <leader>tr :NvimTreeRefresh<cr>
|
||||
|
|
@ -1,140 +0,0 @@
|
|||
local execute = vim.api.nvim_command
|
||||
local fn = vim.fn
|
||||
|
||||
local install_path = fn.stdpath('data')..'/site/pack/packer/opt/packer.nvim'
|
||||
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
fn.system({'git', 'clone', 'https://github.com/wbthomason/packer.nvim', install_path})
|
||||
execute 'packadd packer.nvim'
|
||||
end
|
||||
|
||||
vim.cmd [[packadd packer.nvim]]
|
||||
|
||||
|
||||
require('packer').startup(function()
|
||||
-- Packer can manage itself
|
||||
use 'wbthomason/packer.nvim'
|
||||
|
||||
use {'dracula/vim'}
|
||||
use {'whatyouhide/vim-gotham'}
|
||||
use {'neovim/nvim-lspconfig'}
|
||||
use {'hrsh7th/nvim-compe'}
|
||||
use {'shaunsingh/moonlight.nvim'}
|
||||
|
||||
-- Telescope project search
|
||||
use {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}}
|
||||
}
|
||||
|
||||
use {'nvim-treesitter/nvim-treesitter'}
|
||||
|
||||
use 'kyazdani42/nvim-web-devicons' -- removing this line doesn't change the error
|
||||
use 'kyazdani42/nvim-tree.lua'
|
||||
end)
|
||||
|
||||
|
||||
vim.cmd('colorscheme moonlight')
|
||||
|
||||
-- Setup LSP servers
|
||||
local system_name
|
||||
if vim.fn.has("mac") == 1 then
|
||||
system_name = "macOS"
|
||||
elseif vim.fn.has("unix") == 1 then
|
||||
system_name = "Linux"
|
||||
elseif vim.fn.has('win32') == 1 then
|
||||
system_name = "Windows"
|
||||
else
|
||||
print("Unsupported system for sumneko")
|
||||
end
|
||||
|
||||
local sumneko_root_path = vim.fn.stdpath('cache')..'/lspconfig/sumneko_lua/lua-language-server'
|
||||
local sumneko_binary = sumneko_root_path.."/bin/"..system_name.."/lua-language-server"
|
||||
|
||||
require'lspconfig'.sumneko_lua.setup{
|
||||
cmd = {sumneko_binary, "-E", sumneko_root_path .. "/main.lua"};
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
||||
version = 'LuaJIT',
|
||||
-- Setup your lua path
|
||||
path = vim.split(package.path, ';'),
|
||||
},
|
||||
diagnostics = {
|
||||
-- Get the language server to recognize the `vim` global
|
||||
globals = {'vim'},
|
||||
},
|
||||
workspace = {
|
||||
-- Make the server aware of Neovim runtime files
|
||||
library = {
|
||||
[vim.fn.expand('$VIMRUNTIME/lua')] = true,
|
||||
[vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true,
|
||||
},
|
||||
},
|
||||
-- Do not send telemetry data containing a randomized but unique identifier
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
require'lspconfig'.rls.setup {
|
||||
settings = {
|
||||
rust = {
|
||||
unstable_features = true,
|
||||
build_on_save = false,
|
||||
all_features = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
require'lspconfig'.tsserver.setup{}
|
||||
|
||||
require'lspconfig'.pyls.setup{}
|
||||
|
||||
vim.o.completeopt = "menuone,noselect"
|
||||
require'compe'.setup {
|
||||
enabled = true;
|
||||
autocomplete = true;
|
||||
debug = false;
|
||||
min_length = 1;
|
||||
preselect = 'enable';
|
||||
throttle_time = 80;
|
||||
source_timeout = 200;
|
||||
incomplete_delay = 400;
|
||||
max_abbr_width = 100;
|
||||
max_kind_width = 100;
|
||||
max_menu_width = 100;
|
||||
documentation = true;
|
||||
|
||||
source = {
|
||||
path = true;
|
||||
buffer = true;
|
||||
calc = true;
|
||||
nvim_lsp = true;
|
||||
nvim_lua = true;
|
||||
vsnip = true;
|
||||
ultisnips = true;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
require'lspconfig'.solargraph.setup{}
|
||||
--require'lspconfig'.sorbet.setup{}
|
||||
|
||||
|
||||
--nvim treesitter
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
ensure_installed = "maintained", -- list of languages
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true, -- Highlight also non-parentheses delimiters, boolean or table: lang -> boolean
|
||||
}
|
||||
}
|
42
configs/nvim/lua/helpers.lua
Normal file
42
configs/nvim/lua/helpers.lua
Normal file
|
@ -0,0 +1,42 @@
|
|||
local cmd = vim.cmd -- to execute Vim commands e.g. cmd('pwd')
|
||||
local fn = vim.fn -- to call Vim functions e.g. fn.bufnr()
|
||||
local g = vim.g -- a table to access global variables
|
||||
local opt = vim.opt -- to set options
|
||||
local o = vim.o -- to set options
|
||||
|
||||
local function map(mode, lhs, rhs, opts)
|
||||
local options = {noremap = true}
|
||||
if opts then options = vim.tbl_extend('force', options, opts) end
|
||||
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
|
||||
end
|
||||
|
||||
local function dump(...)
|
||||
local objects = vim.tbl_map(vim.inspect, {...})
|
||||
print(unpack(objects))
|
||||
end
|
||||
|
||||
local function call_with_helpers(user_func)
|
||||
setfenv(user_func,
|
||||
vim.tbl_extend('force', getfenv(), get_helpers()))
|
||||
local status, err = pcall(user_func)
|
||||
if not status then
|
||||
print('Failure running setup function: ' .. vim.inspect(err))
|
||||
else
|
||||
return status
|
||||
end
|
||||
end
|
||||
|
||||
function get_helpers()
|
||||
return {
|
||||
map = map,
|
||||
cmd = cmd,
|
||||
fn = fn,
|
||||
g = g,
|
||||
opt = opt,
|
||||
o = o,
|
||||
dump = dump,
|
||||
call_with_helpers = call_with_helpers,
|
||||
}
|
||||
end
|
||||
|
||||
return get_helpers()
|
48
configs/nvim/lua/mappings.lua
Normal file
48
configs/nvim/lua/mappings.lua
Normal file
|
@ -0,0 +1,48 @@
|
|||
local function init()
|
||||
-- command! LogPath :lua print(vim.inspect(vim.lsp.get_log_path()))
|
||||
|
||||
-------------------- Telescope -----------------------------
|
||||
map('n', '<space>ff', '<cmd>Telescope find_files<CR>')
|
||||
map('n', '<space>fg', '<cmd>Telescope live_grep<CR>')
|
||||
map('n', '<space>fb', '<cmd>Telescope buffers<CR>')
|
||||
map('n', '<space>fh', '<cmd>Telescope help_tags<CR>')
|
||||
map('n', '<space>ps', [[<cmd>lua require('telescope.builtin').grep_string({ search = vim.fn.input("Grep For >")})<CR>]])
|
||||
|
||||
-------------------- NvimTreeToggle ------------------------
|
||||
map('n', '<F4>', '<cmd>NvimTreeToggle<CR>')
|
||||
map('n', '<F5>', '<cmd>NvimTreeRefresh<CR>')
|
||||
|
||||
-------------------- LSP -----------------------------------
|
||||
map('n', '<space>,', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>')
|
||||
map('n', '<space>;', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>')
|
||||
map('n', '<space>a', '<cmd>lua vim.lsp.buf.code_action()<CR>')
|
||||
map('n', '<space>d', '<cmd>lua vim.lsp.buf.definition()<CR>')
|
||||
map('n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>')
|
||||
map('n', '<space>h', '<cmd>lua vim.lsp.buf.hover()<CR>')
|
||||
map('n', '<space>m', '<cmd>lua vim.lsp.buf.rename()<CR>')
|
||||
map('n', '<space>r', '<cmd>lua vim.lsp.buf.references()<CR>')
|
||||
map('n', '<space>s', '<cmd>lua vim.lsp.buf.document_symbol()<CR>')
|
||||
|
||||
-------------------- HlsLens -------------------------------
|
||||
map('n', 'n', "<Cmd>execute('normal! ' . v:count1 . 'n')<CR><Cmd>lua require('hlslens').start()<CR>")
|
||||
map('n', 'N', "<Cmd>execute('normal! ' . v:count1 . 'N')<CR><Cmd>lua require('hlslens').start()<CR>")
|
||||
map('n', '*', "*<Cmd>lua require('hlslens').start()<CR>")
|
||||
map('n', '#', "#<Cmd>lua require('hlslens').start()<CR>")
|
||||
map('n', 'g*', "g*<Cmd>lua require('hlslens').start()<CR>")
|
||||
map('n', 'g#', "g#<Cmd>lua require('hlslens').start()<CR>")
|
||||
|
||||
-------------------- FTerm ---------------------------------
|
||||
map('n', '<F3>', '<CMD>lua require("FTerm").toggle()<CR>')
|
||||
map('t', '<F3>', '<C-\\><C-n><CMD>lua require("FTerm").toggle()<CR>')
|
||||
|
||||
-------------------- LAZYGIT -------------------------------
|
||||
-- Install docs : https://github.com/jesseduffield/lazygit
|
||||
map('n', '<F2>', '<cmd>LazyGit<CR>')
|
||||
|
||||
-------------------- COMMANDS ------------------------------
|
||||
cmd 'au TextYankPost * lua vim.highlight.on_yank {on_visual = false}' -- disabled in visual mode
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
29
configs/nvim/lua/options.lua
Normal file
29
configs/nvim/lua/options.lua
Normal file
|
@ -0,0 +1,29 @@
|
|||
local function init()
|
||||
cmd('colorscheme moonlight')
|
||||
|
||||
opt.completeopt = {'menuone', 'noinsert', 'noselect'} -- Completion options (for deoplete)
|
||||
opt.expandtab = true -- Use spaces instead of tabs
|
||||
opt.hidden = true -- Enable background buffers
|
||||
opt.ignorecase = true -- Ignore case
|
||||
opt.joinspaces = false -- No double spaces with join
|
||||
opt.list = true -- Show some invisible characters
|
||||
opt.number = true -- Show line numbers
|
||||
opt.relativenumber = true -- Relative line numbers
|
||||
opt.scrolloff = 4 -- Lines of context
|
||||
opt.shiftround = true -- Round indent
|
||||
opt.shiftwidth = 2 -- Size of an indent
|
||||
opt.sidescrolloff = 8 -- Columns of context
|
||||
opt.smartcase = true -- Do not ignore case with capitals
|
||||
opt.autoindent = true -- Insert indents automatically
|
||||
opt.splitbelow = true -- Put new windows below current
|
||||
opt.splitright = true -- Put new windows right of current
|
||||
opt.tabstop = 2 -- Number of spaces tabs count for
|
||||
opt.termguicolors = true -- True color support
|
||||
opt.wildmode = {'list', 'longest'} -- Command-line completion mode
|
||||
opt.wrap = false -- Disable line wrap
|
||||
opt.mouse = 'a' -- Enable mouse for all previous modes
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
31
configs/nvim/lua/plugins/compe.lua
Normal file
31
configs/nvim/lua/plugins/compe.lua
Normal file
|
@ -0,0 +1,31 @@
|
|||
local function init()
|
||||
vim.o.completeopt = "menuone,noselect"
|
||||
require'compe'.setup {
|
||||
enabled = true;
|
||||
autocomplete = true;
|
||||
debug = false;
|
||||
min_length = 1;
|
||||
preselect = 'enable';
|
||||
throttle_time = 80;
|
||||
source_timeout = 200;
|
||||
incomplete_delay = 400;
|
||||
max_abbr_width = 100;
|
||||
max_kind_width = 100;
|
||||
max_menu_width = 100;
|
||||
documentation = true;
|
||||
|
||||
source = {
|
||||
path = true;
|
||||
buffer = true;
|
||||
calc = true;
|
||||
nvim_lsp = true;
|
||||
nvim_lua = true;
|
||||
vsnip = true;
|
||||
ultisnips = true;
|
||||
};
|
||||
}
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
145
configs/nvim/lua/plugins/init.lua
Normal file
145
configs/nvim/lua/plugins/init.lua
Normal file
|
@ -0,0 +1,145 @@
|
|||
function configure_packages()
|
||||
call_with_helpers(require('plugins.lspconfig').init)
|
||||
call_with_helpers(require('plugins.compe').init)
|
||||
call_with_helpers(require('plugins.nvim-treesitter').init)
|
||||
call_with_helpers(require('plugins.nvim-web-devicons').init)
|
||||
call_with_helpers(require('plugins.nvim-autopairs').init)
|
||||
call_with_helpers(require('plugins.nvim-notify').init)
|
||||
call_with_helpers(require('plugins.nvim-hlslens').init)
|
||||
call_with_helpers(require('plugins.nvim-flutter-tools').init)
|
||||
call_with_helpers(require('plugins.nvim-fterm').init)
|
||||
call_with_helpers(require('plugins.nvim-feline').init)
|
||||
call_with_helpers(require('plugins.nvim-todo-comments').init)
|
||||
call_with_helpers(require('plugins.nvim-lightspeed').init)
|
||||
call_with_helpers(require('plugins.nvim-numb').init)
|
||||
call_with_helpers(require('plugins.nvim-neoscroll').init)
|
||||
call_with_helpers(require('plugins.nvim-lspkind').init)
|
||||
call_with_helpers(require('plugins.nvim-signature').init)
|
||||
call_with_helpers(require('plugins.nvim-gutentags').init)
|
||||
call_with_helpers(require('plugins.nvim-indent-blankline').init)
|
||||
call_with_helpers(require('plugins.nvim-editorconfig').init)
|
||||
call_with_helpers(require('plugins.nvim-ctrlsf').init)
|
||||
end
|
||||
|
||||
function install_packages()
|
||||
-- Packer can manage itself as an optional plugin
|
||||
use 'wbthomason/packer.nvim'
|
||||
|
||||
-- LSP
|
||||
use 'neovim/nvim-lspconfig'
|
||||
use 'onsails/lspkind-nvim'
|
||||
use 'kabouzeid/nvim-lspinstall'
|
||||
|
||||
-- Autocomplete
|
||||
use 'hrsh7th/nvim-compe'
|
||||
use 'SirVer/ultisnips'
|
||||
use 'honza/vim-snippets'
|
||||
use 'windwp/nvim-autopairs'
|
||||
use 'AndrewRadev/tagalong.vim'
|
||||
use 'andymass/vim-matchup'
|
||||
|
||||
-- Treesitter
|
||||
use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' }
|
||||
use 'p00f/nvim-ts-rainbow'
|
||||
use 'lukas-reineke/indent-blankline.nvim'
|
||||
use 'JoosepAlviste/nvim-ts-context-commentstring'
|
||||
use 'romgrk/nvim-treesitter-context'
|
||||
|
||||
-- Syntax
|
||||
use 'moll/vim-node'
|
||||
use 'zinit-zsh/zplugin-vim-syntax'
|
||||
use 'editorconfig/editorconfig-vim'
|
||||
use 'chrisbra/csv.vim'
|
||||
use 'npxbr/glow.nvim'
|
||||
use 'junegunn/vim-easy-align'
|
||||
|
||||
-- Icons
|
||||
use 'kyazdani42/nvim-web-devicons'
|
||||
use 'ryanoasis/vim-devicons'
|
||||
|
||||
-- Status Line and Bufferline
|
||||
use 'famiu/feline.nvim' -- A minimal, stylish and customizable statusline for Neovim written in Lua
|
||||
use 'romgrk/barbar.nvim' -- Tabs, as understood by any other editor.
|
||||
|
||||
-- Telescope project search
|
||||
use 'nvim-lua/popup.nvim'
|
||||
use 'nvim-lua/plenary.nvim'
|
||||
use 'nvim-telescope/telescope.nvim'
|
||||
use 'nvim-telescope/telescope-fzy-native.nvim'
|
||||
use 'nvim-telescope/telescope-project.nvim'
|
||||
use 'fhill2/telescope-ultisnips.nvim'
|
||||
|
||||
-- Explorer
|
||||
use 'kyazdani42/nvim-tree.lua'
|
||||
|
||||
-- Git
|
||||
use 'kdheepak/lazygit.nvim'
|
||||
|
||||
-- Flutter
|
||||
use 'akinsho/flutter-tools.nvim'
|
||||
|
||||
-- Move & Search & replace
|
||||
use 'windwp/nvim-spectre'
|
||||
use 'nacro90/numb.nvim'
|
||||
use 'dyng/ctrlsf.vim'
|
||||
use 'kevinhwang91/nvim-hlslens' -- nvim-hlslens helps you better glance at matched information, seamlessly jump between matched instances.
|
||||
use 'ggandor/lightspeed.nvim'
|
||||
use 'kshenoy/vim-signature'
|
||||
use 'karb94/neoscroll.nvim'
|
||||
use 'dstein64/nvim-scrollview'
|
||||
use 'chaoren/vim-wordmotion'
|
||||
|
||||
-- Tim Pope docet
|
||||
use 'tpope/vim-sensible'
|
||||
use 'tpope/vim-rails'
|
||||
use 'tpope/vim-abolish'
|
||||
use 'tpope/vim-surround'
|
||||
use 'tpope/vim-bundler'
|
||||
use 'tpope/vim-capslock'
|
||||
use 'tpope/vim-repeat'
|
||||
use 'tpope/vim-endwise' -- auto complete block with end
|
||||
use 'tpope/vim-rvm'
|
||||
use 'tpope/vim-dispatch'
|
||||
use 'tpope/vim-dadbod'
|
||||
use 'tpope/vim-jdaddy'
|
||||
use 'tpope/vim-fugitive'
|
||||
use 'tpope/vim-commentary'
|
||||
|
||||
-- Tmux
|
||||
use 'christoomey/vim-tmux-navigator'
|
||||
|
||||
-- Colorschema
|
||||
use 'dracula/vim'
|
||||
use 'whatyouhide/vim-gotham'
|
||||
use 'shaunsingh/moonlight.nvim'
|
||||
|
||||
-- Tags
|
||||
use 'ludovicchabant/vim-gutentags'
|
||||
|
||||
-- General Plugins
|
||||
use 'rcarriga/nvim-notify' -- fancy notification
|
||||
use 'mfussenegger/nvim-dap' -- debugger
|
||||
use 'numtostr/FTerm.nvim' -- Floating terminal
|
||||
use 'folke/todo-comments.nvim'
|
||||
use 'lambdalisue/suda.vim'
|
||||
use 'mhinz/vim-startify' -- The fancy start screen for Vim.
|
||||
end
|
||||
|
||||
function init()
|
||||
local install_path = fn.stdpath('data')..'/site/pack/packer/opt/packer.nvim'
|
||||
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
fn.system({'git', 'clone', 'https://github.com/wbthomason/packer.nvim', install_path})
|
||||
cmd 'packadd packer.nvim'
|
||||
end
|
||||
|
||||
cmd 'packadd packer.nvim'
|
||||
|
||||
require('packer').startup(install_packages)
|
||||
|
||||
call_with_helpers(configure_packages)
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
7
configs/nvim/lua/plugins/lspconfig/dart.lua
Normal file
7
configs/nvim/lua/plugins/lspconfig/dart.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
local function init()
|
||||
require'lspconfig'.dartls.setup{}
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
12
configs/nvim/lua/plugins/lspconfig/init.lua
Normal file
12
configs/nvim/lua/plugins/lspconfig/init.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
local function init()
|
||||
call_with_helpers(require('plugins.lspconfig.lua').init)
|
||||
call_with_helpers(require('plugins.lspconfig.rust').init)
|
||||
call_with_helpers(require('plugins.lspconfig.typescript').init)
|
||||
call_with_helpers(require('plugins.lspconfig.ruby').init)
|
||||
call_with_helpers(require('plugins.lspconfig.php').init)
|
||||
call_with_helpers(require('plugins.lspconfig.dart').init)
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
48
configs/nvim/lua/plugins/lspconfig/lua.lua
Normal file
48
configs/nvim/lua/plugins/lspconfig/lua.lua
Normal file
|
@ -0,0 +1,48 @@
|
|||
local function init()
|
||||
local system_name
|
||||
if vim.fn.has("mac") == 1 then
|
||||
system_name = "macOS"
|
||||
elseif vim.fn.has("unix") == 1 then
|
||||
system_name = "Linux"
|
||||
elseif vim.fn.has('win32') == 1 then
|
||||
system_name = "Windows"
|
||||
else
|
||||
print("Unsupported system for sumneko")
|
||||
end
|
||||
|
||||
local sumneko_root_path = fn.stdpath('cache')..'/lspconfig/sumneko_lua/lua-language-server'
|
||||
local sumneko_binary = sumneko_root_path.."/bin/"..system_name.."/lua-language-server"
|
||||
|
||||
require'lspconfig'.sumneko_lua.setup{
|
||||
cmd = {sumneko_binary, "-E", sumneko_root_path .. "/main.lua"};
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
||||
version = 'LuaJIT',
|
||||
-- Setup your lua path
|
||||
path = vim.split(package.path, ';'),
|
||||
},
|
||||
diagnostics = {
|
||||
-- Get the language server to recognize the `vim` global
|
||||
globals = {'vim'},
|
||||
},
|
||||
workspace = {
|
||||
-- Make the server aware of Neovim runtime files
|
||||
library = {
|
||||
[vim.fn.expand('$VIMRUNTIME/lua')] = true,
|
||||
[vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true,
|
||||
},
|
||||
},
|
||||
-- Do not send telemetry data containing a randomized but unique identifier
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
7
configs/nvim/lua/plugins/lspconfig/php.lua
Normal file
7
configs/nvim/lua/plugins/lspconfig/php.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
local function init()
|
||||
require'lspconfig'.phpactor.setup{}
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
7
configs/nvim/lua/plugins/lspconfig/ruby.lua
Normal file
7
configs/nvim/lua/plugins/lspconfig/ruby.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
local function init()
|
||||
require'lspconfig'.solargraph.setup{}
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
7
configs/nvim/lua/plugins/lspconfig/rust.lua
Normal file
7
configs/nvim/lua/plugins/lspconfig/rust.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
local function init()
|
||||
require'lspconfig'.rust_analyzer.setup{}
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
7
configs/nvim/lua/plugins/lspconfig/typescript.lua
Normal file
7
configs/nvim/lua/plugins/lspconfig/typescript.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
local function init()
|
||||
require'lspconfig'.tsserver.setup{}
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
11
configs/nvim/lua/plugins/nvim-autopairs.lua
Normal file
11
configs/nvim/lua/plugins/nvim-autopairs.lua
Normal file
|
@ -0,0 +1,11 @@
|
|||
local function init()
|
||||
require('nvim-autopairs').setup()
|
||||
require("nvim-autopairs.completion.compe").setup({
|
||||
map_cr = true, -- map <CR> on insert mode
|
||||
map_complete = true -- it will auto insert `(` after select function or method item
|
||||
})
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
9
configs/nvim/lua/plugins/nvim-ctrlsf.lua
Normal file
9
configs/nvim/lua/plugins/nvim-ctrlsf.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
local function init()
|
||||
g.ctrlsf_ackprg = 'rg'
|
||||
g.ctrls_auto_preview = 1
|
||||
g.ctrlsf_search_mode = 'async'
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
7
configs/nvim/lua/plugins/nvim-editorconfig.lua
Normal file
7
configs/nvim/lua/plugins/nvim-editorconfig.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
local function init()
|
||||
g.EditorConfig_exclude_patterns = { 'fugitive://.*', 'scp://.*' }
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
7
configs/nvim/lua/plugins/nvim-feline.lua
Normal file
7
configs/nvim/lua/plugins/nvim-feline.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
local function init()
|
||||
require('feline').setup()
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
7
configs/nvim/lua/plugins/nvim-flutter-tools.lua
Normal file
7
configs/nvim/lua/plugins/nvim-flutter-tools.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
local function init()
|
||||
require('flutter-tools').setup()
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
15
configs/nvim/lua/plugins/nvim-fterm.lua
Normal file
15
configs/nvim/lua/plugins/nvim-fterm.lua
Normal file
|
@ -0,0 +1,15 @@
|
|||
local function init()
|
||||
require('FTerm').setup {
|
||||
dimensions = {
|
||||
height = 0.8,
|
||||
width = 0.8,
|
||||
x = 0.5,
|
||||
y = 0.5
|
||||
},
|
||||
border = 'double'
|
||||
}
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
17
configs/nvim/lua/plugins/nvim-gutentags.lua
Normal file
17
configs/nvim/lua/plugins/nvim-gutentags.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
local function init()
|
||||
cmd('set tags+=tags,.git/tags')
|
||||
g.gutentags_enabled = 1
|
||||
g.gutentags_generate_on_missing = 1
|
||||
g.gutentags_generate_on_write = 1
|
||||
g.gutentags_resolve_symlinks = 1
|
||||
g.gutentags_ctags_tagfile = '.git/tags'
|
||||
g.gutentags_project_root = { '.git' }
|
||||
g.gutentags_ctags_extra_args = { '--fields=+l' }
|
||||
g.gutentags_add_default_project_roots = 0
|
||||
g.gutentags_ctags_executable_ruby = 'ripper-tags'
|
||||
g.gutentags_ctags_extra_args = { '--ignore-unsupported-options', '--recursive' }
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
36
configs/nvim/lua/plugins/nvim-hlslens.lua
Normal file
36
configs/nvim/lua/plugins/nvim-hlslens.lua
Normal file
|
@ -0,0 +1,36 @@
|
|||
local function init()
|
||||
require('hlslens').setup {
|
||||
calm_down = true,
|
||||
override_lens = function(render, plist, nearest, idx, r_idx)
|
||||
local sfw = vim.v.searchforward == 1
|
||||
local indicator, text, chunks
|
||||
local abs_r_idx = math.abs(r_idx)
|
||||
if abs_r_idx > 1 then
|
||||
indicator = string.format('%d%s', abs_r_idx, sfw ~= (r_idx > 1) and '' or '')
|
||||
elseif abs_r_idx == 1 then
|
||||
indicator = sfw ~= (r_idx == 1) and '' or ''
|
||||
else
|
||||
indicator = ''
|
||||
end
|
||||
|
||||
local lnum, col = unpack(plist[idx])
|
||||
if nearest then
|
||||
local cnt = #plist
|
||||
if indicator ~= '' then
|
||||
text = string.format('[%s %d/%d]', indicator, idx, cnt)
|
||||
else
|
||||
text = string.format('[%d/%d]', idx, cnt)
|
||||
end
|
||||
chunks = {{' ', 'Ignore'}, {text, 'HlSearchLensNear'}}
|
||||
else
|
||||
text = string.format('[%s %d]', indicator, idx)
|
||||
chunks = {{' ', 'Ignore'}, {text, 'HlSearchLens'}}
|
||||
end
|
||||
render.set_virt(0, lnum - 1, col - 1, chunks, nearest)
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
12
configs/nvim/lua/plugins/nvim-indent-blankline.lua
Normal file
12
configs/nvim/lua/plugins/nvim-indent-blankline.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
local function init()
|
||||
g.indent_blankline_show_current_context = true
|
||||
g.indent_blankline_buftype_exclude = {'terminal'}
|
||||
g.indent_blankline_filetype_exclude = {'help', 'startify', 'dashboard', 'packer', 'neogitstatus', 'NvimTree'}
|
||||
g.indent_blankline_char = '▏'
|
||||
g.indent_blankline_use_treesitter = true
|
||||
g.indent_blankline_show_trailing_blankline_indent = false
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
7
configs/nvim/lua/plugins/nvim-lightspeed.lua
Normal file
7
configs/nvim/lua/plugins/nvim-lightspeed.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
local function init()
|
||||
require("lightspeed").setup {}
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
9
configs/nvim/lua/plugins/nvim-lspkind.lua
Normal file
9
configs/nvim/lua/plugins/nvim-lspkind.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
local function init()
|
||||
require('lspkind').init {
|
||||
with_text = true,
|
||||
}
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
7
configs/nvim/lua/plugins/nvim-neoscroll.lua
Normal file
7
configs/nvim/lua/plugins/nvim-neoscroll.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
local function init()
|
||||
require('neoscroll').setup()
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
7
configs/nvim/lua/plugins/nvim-notify.lua
Normal file
7
configs/nvim/lua/plugins/nvim-notify.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
local function init()
|
||||
vim.notify = require("notify")
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
10
configs/nvim/lua/plugins/nvim-numb.lua
Normal file
10
configs/nvim/lua/plugins/nvim-numb.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
local function init()
|
||||
require('numb').setup {
|
||||
show_numbers = true, -- Enable 'number' for the window while peeking
|
||||
show_cursorline = true -- Enable 'cursorline' for the window while peeking
|
||||
}
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
8
configs/nvim/lua/plugins/nvim-signature.lua
Normal file
8
configs/nvim/lua/plugins/nvim-signature.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
local function init()
|
||||
g.SignatureMarkTextHLDynamic = 1
|
||||
g.SignatureMarkerTextHLDynamic = 1
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
7
configs/nvim/lua/plugins/nvim-todo-comments.lua
Normal file
7
configs/nvim/lua/plugins/nvim-todo-comments.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
local function init()
|
||||
require("todo-comments").setup {}
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
16
configs/nvim/lua/plugins/nvim-treesitter.lua
Normal file
16
configs/nvim/lua/plugins/nvim-treesitter.lua
Normal file
|
@ -0,0 +1,16 @@
|
|||
local function init()
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
ensure_installed = "all", -- list of languages
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true, -- Highlight also non-parentheses delimiters, boolean or table: lang -> boolean
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
12
configs/nvim/lua/plugins/nvim-web-devicons.lua
Normal file
12
configs/nvim/lua/plugins/nvim-web-devicons.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
local function init()
|
||||
require'nvim-web-devicons'.setup {
|
||||
-- globally enable default icons (default to false)
|
||||
-- will get overriden by `get_icons` option
|
||||
default = true;
|
||||
}
|
||||
require'nvim-web-devicons'.get_icons()
|
||||
end
|
||||
|
||||
return {
|
||||
init = init
|
||||
}
|
|
@ -1,127 +0,0 @@
|
|||
" Automatically generated packer.nvim plugin loader code
|
||||
|
||||
if !has('nvim-0.5')
|
||||
echohl WarningMsg
|
||||
echom "Invalid Neovim version for packer.nvim!"
|
||||
echohl None
|
||||
finish
|
||||
endif
|
||||
|
||||
packadd packer.nvim
|
||||
|
||||
try
|
||||
|
||||
lua << END
|
||||
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
|
||||
|
||||
_G._packer = _G._packer or {}
|
||||
_G._packer.profile_output = results
|
||||
end
|
||||
|
||||
time([[Luarocks path setup]], true)
|
||||
local package_path_str = "/home/matcha/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/matcha/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/matcha/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/matcha/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
|
||||
local install_cpath_pattern = "/home/matcha/.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))
|
||||
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 = {
|
||||
["moonlight.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/matcha/.local/share/nvim/site/pack/packer/start/moonlight.nvim"
|
||||
},
|
||||
["nvim-compe"] = {
|
||||
loaded = true,
|
||||
path = "/home/matcha/.local/share/nvim/site/pack/packer/start/nvim-compe"
|
||||
},
|
||||
["nvim-lspconfig"] = {
|
||||
loaded = true,
|
||||
path = "/home/matcha/.local/share/nvim/site/pack/packer/start/nvim-lspconfig"
|
||||
},
|
||||
["nvim-treesitter"] = {
|
||||
loaded = true,
|
||||
path = "/home/matcha/.local/share/nvim/site/pack/packer/start/nvim-treesitter"
|
||||
},
|
||||
["packer.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/matcha/.local/share/nvim/site/pack/packer/start/packer.nvim"
|
||||
},
|
||||
["plenary.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/matcha/.local/share/nvim/site/pack/packer/start/plenary.nvim"
|
||||
},
|
||||
["popup.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/matcha/.local/share/nvim/site/pack/packer/start/popup.nvim"
|
||||
},
|
||||
["telescope.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/matcha/.local/share/nvim/site/pack/packer/start/telescope.nvim"
|
||||
},
|
||||
vim = {
|
||||
loaded = true,
|
||||
path = "/home/matcha/.local/share/nvim/site/pack/packer/start/vim"
|
||||
},
|
||||
["vim-gotham"] = {
|
||||
loaded = true,
|
||||
path = "/home/matcha/.local/share/nvim/site/pack/packer/start/vim-gotham"
|
||||
}
|
||||
}
|
||||
|
||||
time([[Defining packer_plugins]], false)
|
||||
if should_profile then save_profiles() end
|
||||
|
||||
END
|
||||
|
||||
catch
|
||||
echohl ErrorMsg
|
||||
echom "Error in packer_compiled: " .. v:exception
|
||||
echom "Please check your config for correctness"
|
||||
echohl None
|
||||
endtry
|
86
configs/powershell/ohmyposh.json
Normal file
86
configs/powershell/ohmyposh.json
Normal file
|
@ -0,0 +1,86 @@
|
|||
{
|
||||
"final_space": true,
|
||||
"console_title": true,
|
||||
"console_title_style": "folder",
|
||||
"blocks": [
|
||||
{
|
||||
"type": "prompt",
|
||||
"alignment": "left",
|
||||
"horizontal_offset": 0,
|
||||
"vertical_offset": 0,
|
||||
"segments": [
|
||||
{
|
||||
"type": "path",
|
||||
"style": "diamond",
|
||||
"powerline_symbol": "",
|
||||
"invert_powerline": false,
|
||||
"foreground": "#ffffff",
|
||||
"background": "#ff479c",
|
||||
"leading_diamond": "",
|
||||
"trailing_diamond": "",
|
||||
"properties": {
|
||||
"prefix": " ",
|
||||
"style": "folder"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "git",
|
||||
"style": "powerline",
|
||||
"powerline_symbol": "",
|
||||
"invert_powerline": false,
|
||||
"foreground": "#193549",
|
||||
"background": "#fffb38",
|
||||
"leading_diamond": "",
|
||||
"trailing_diamond": "",
|
||||
"properties": {
|
||||
"display_status": true,
|
||||
"display_stash_count": true,
|
||||
"display_upstream_icon": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "dotnet",
|
||||
"style": "powerline",
|
||||
"powerline_symbol": "",
|
||||
"invert_powerline": false,
|
||||
"foreground": "#ffffff",
|
||||
"background": "#6CA35E",
|
||||
"leading_diamond": "",
|
||||
"trailing_diamond": "",
|
||||
"properties": {
|
||||
"display_version": true,
|
||||
"prefix": " "
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "root",
|
||||
"style": "powerline",
|
||||
"powerline_symbol": "",
|
||||
"invert_powerline": false,
|
||||
"foreground": "#ffffff",
|
||||
"background": "#ffff66",
|
||||
"leading_diamond": "",
|
||||
"trailing_diamond": "",
|
||||
"properties": null
|
||||
},
|
||||
{
|
||||
"type": "exit",
|
||||
"style": "powerline",
|
||||
"powerline_symbol": "",
|
||||
"invert_powerline": false,
|
||||
"foreground": "#ffffff",
|
||||
"background": "#2e9599",
|
||||
"leading_diamond": "",
|
||||
"trailing_diamond": "",
|
||||
"properties": {
|
||||
"always_enabled": true,
|
||||
"color_background": true,
|
||||
"display_exit_code": false,
|
||||
"error_color": "#f1184c",
|
||||
"prefix": " "
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
31
fonts/CONF.md
Normal file
31
fonts/CONF.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
# Fonts
|
||||
|
||||
- Cascadia Code PL => IDE Best font with ligatures
|
||||
- Delugia Complete => Cascadia Code PL + Nerd font (not work in few IDE)
|
||||
|
||||
# Configuration VSCode
|
||||
|
||||
```json
|
||||
{
|
||||
"editor.fontFamily": "'Cascadia Code PL', Consolas, 'Courier New', monospace",
|
||||
"editor.fontLigatures": true,
|
||||
[...]
|
||||
}
|
||||
```
|
||||
|
||||
# Configuration Windows Terminal
|
||||
|
||||
```json
|
||||
{
|
||||
"profiles":
|
||||
{
|
||||
"defaults":
|
||||
{
|
||||
"fontFace": "Delugia Complete",
|
||||
[...]
|
||||
},
|
||||
[...]
|
||||
},
|
||||
[...]
|
||||
}
|
||||
```
|
BIN
fonts/CascadiaCodePL.ttf
Normal file
BIN
fonts/CascadiaCodePL.ttf
Normal file
Binary file not shown.
BIN
fonts/CascadiaCodePLItalic.ttf
Normal file
BIN
fonts/CascadiaCodePLItalic.ttf
Normal file
Binary file not shown.
BIN
fonts/DelugiaComplete-Bold.ttf
Normal file
BIN
fonts/DelugiaComplete-Bold.ttf
Normal file
Binary file not shown.
BIN
fonts/DelugiaComplete-BoldItalic.ttf
Normal file
BIN
fonts/DelugiaComplete-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
fonts/DelugiaComplete-Italic.ttf
Normal file
BIN
fonts/DelugiaComplete-Italic.ttf
Normal file
Binary file not shown.
BIN
fonts/DelugiaComplete.ttf
Normal file
BIN
fonts/DelugiaComplete.ttf
Normal file
Binary file not shown.
BIN
fonts/DelugiaCompleteLight-Italic.ttf
Normal file
BIN
fonts/DelugiaCompleteLight-Italic.ttf
Normal file
Binary file not shown.
BIN
fonts/DelugiaCompleteLight.ttf
Normal file
BIN
fonts/DelugiaCompleteLight.ttf
Normal file
Binary file not shown.
63
install.ps1
Normal file
63
install.ps1
Normal file
|
@ -0,0 +1,63 @@
|
|||
# Install OhMyPosh
|
||||
winget list -q JanDeDobbeleer.OhMyPosh
|
||||
if ($? -eq $False) {
|
||||
winget install JanDeDobbeleer.OhMyPosh
|
||||
}
|
||||
|
||||
# Reload path
|
||||
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
|
||||
|
||||
# Install modules
|
||||
if (-not (Get-Module -ListAvailable -Name Terminal-Icons)) {
|
||||
Install-Module -Name Terminal-Icons -Repository PSGallery -Force
|
||||
}
|
||||
if (-not (Get-Module -ListAvailable -Name PSReadLine)) {
|
||||
Install-Module -Name PSReadLine -AllowPrerelease -Force
|
||||
}
|
||||
|
||||
# Update profile configuration
|
||||
|
||||
# 1. Import all required params
|
||||
$powershellConfig = (Get-Location).Path + "\configs\powershell\phmyposh.json"
|
||||
Write-Output @'
|
||||
function Reload-Path {
|
||||
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
|
||||
}
|
||||
|
||||
Reload-Path
|
||||
'@ | Out-File -FilePath $PROFILE
|
||||
Write-Output 'Import-Module -Name Terminal-Icons' | Out-File -FilePath $PROFILE -Append
|
||||
Write-Output @'
|
||||
if ($host.Name -eq 'ConsoleHost')
|
||||
{
|
||||
Import-Module -Name PSReadLine
|
||||
}
|
||||
'@ | Out-File -FilePath $PROFILE -Append
|
||||
Write-Output "oh-my-posh --init --shell pwsh --config '$powershellConfig' | Invoke-Expression" | Out-File -FilePath $PROFILE -Append
|
||||
|
||||
# 2. Configure PSReadLine | Predictive Intellisense
|
||||
Write-Output @'
|
||||
$PSReadLineOptions = @{
|
||||
EditMode = "Windows"
|
||||
HistoryNoDuplicates = $True
|
||||
PredictionSource = "History"
|
||||
CompletionQueryItems = 5
|
||||
ShowToolTips = $True
|
||||
}
|
||||
Set-PSReadLineOption @PSReadLineOptions
|
||||
'@ | Out-File -FilePath $PROFILE -Append
|
||||
|
||||
# Reload profile
|
||||
. $PROFILE
|
||||
|
||||
# Configure WSL
|
||||
Get-Command wsl
|
||||
if ($? -eq $True) {
|
||||
$linuxWindowsConfPath = (Get-Location).Path.Replace('C:', '/mnt/c').Replace('\', '/')
|
||||
$linuxHomeConfPath = "/home/$(wsl -e 'whoami')/myconf"
|
||||
|
||||
bash -c "ln -s $linuxWindowsConfPath $linuxHomeConfPath"
|
||||
bash -c "$linuxHomeConfPath/install.sh"
|
||||
} else {
|
||||
Write-Output 'WSL is not installed. Ignore...'
|
||||
}
|
0
install.sh
Executable file → Normal file
0
install.sh
Executable file → Normal file
0
install_scripts/ubuntu.sh
Executable file → Normal file
0
install_scripts/ubuntu.sh
Executable file → Normal file
4
useful_scripts/cleanup_wsl_mem.sh
Normal file
4
useful_scripts/cleanup_wsl_mem.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
sudo bash -c "echo 1 > /proc/sys/vm/drop_caches"
|
||||
sudo bash -c "echo 1 > /proc/sys/vm/compact_memory"
|
Loading…
Add table
Reference in a new issue