Compare commits
7 Commits
ba71eb1558
...
4c0a59e0a3
Author | SHA1 | Date | |
---|---|---|---|
|
4c0a59e0a3 | ||
|
7b53a7b88b | ||
|
6db4f1c440 | ||
1c559ffc3e | |||
2cd1dea577 | |||
8c571636bc | |||
e234c42507 |
@ -1,8 +1,7 @@
|
||||
---
|
||||
Language: Cpp
|
||||
|
||||
IndentWidth: 4
|
||||
TabWidth: 4
|
||||
---
|
||||
Language: Cpp
|
||||
|
||||
# Align parameters on the open bracket, e.g.:
|
||||
# someLongFunction(argument1,
|
||||
@ -197,7 +196,7 @@ BreakInheritanceList: AfterComma
|
||||
# "ryVeryVeryVeryVeryVery"
|
||||
# "VeryLongString";
|
||||
BreakStringLiterals: true
|
||||
ColumnLimit: 100
|
||||
ColumnLimit: 0
|
||||
|
||||
# false:
|
||||
# namespace Foo {
|
||||
@ -328,6 +327,10 @@ NamespaceIndentation: None
|
||||
PackConstructorInitializers: CurrentLine
|
||||
PointerAlignment: Right
|
||||
|
||||
# Different ways to arrange specifiers and qualifiers (e.g. const/volatile).
|
||||
QualifierAlignment: Custom
|
||||
QualifierOrder: ['inline', 'static', 'type', 'const', 'volatile']
|
||||
|
||||
# false:
|
||||
# // veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with plenty of information
|
||||
# /* second veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with plenty of information */
|
||||
|
@ -1,5 +1,4 @@
|
||||
" Plugins
|
||||
" ==============================================================================
|
||||
" Plugins ==========================================================================================
|
||||
call plug#begin(stdpath('config') . '/plugged')
|
||||
" nerdtree provides a file tree explorer
|
||||
" vim-dispatch allows running async jobs in vim (i.e. builds in the background)
|
||||
@ -26,6 +25,7 @@ call plug#begin(stdpath('config') . '/plugged')
|
||||
|
||||
" Lua cache to speed up load times
|
||||
Plug 'https://github.com/lewis6991/impatient.nvim'
|
||||
Plug 'https://github.com/ggandor/leap.nvim'
|
||||
|
||||
" lsp-zero begin
|
||||
" LSP Support
|
||||
@ -50,16 +50,16 @@ call plug#begin(stdpath('config') . '/plugged')
|
||||
" lsp-zero end
|
||||
call plug#end()
|
||||
|
||||
" Lua Setup
|
||||
" ==============================================================================
|
||||
" Lua Setup ========================================================================================
|
||||
lua <<EOF
|
||||
require('impatient')
|
||||
local leap = require('leap')
|
||||
vim.keymap.set({'n', 'x', 'o'}, '<leader>r', '<Plug>(leap-forward-to)')
|
||||
vim.keymap.set({'n', 'x', 'o'}, '<leader>R', '<Plug>(leap-backward-to)')
|
||||
|
||||
-- LSP Setup
|
||||
-- ===========================================================================
|
||||
-- LSP Setup =====================================================================================
|
||||
local lsp = require('lsp-zero')
|
||||
local devenver_root = vim.fn.getenv('devenver_root')
|
||||
local clang_format_fallback_file = devenver_root .. '/_clang-format'
|
||||
lsp.preset('recommended')
|
||||
lsp.configure('clangd', {
|
||||
cmd = {
|
||||
@ -72,14 +72,12 @@ lua <<EOF
|
||||
"--clang-tidy",
|
||||
"--header-insertion=iwyu",
|
||||
"--header-insertion-decorators",
|
||||
"--fallback-style=" .. clang_format_fallback_file,
|
||||
}
|
||||
})
|
||||
|
||||
lsp.setup()
|
||||
|
||||
-- Treesitter
|
||||
-- ===========================================================================
|
||||
-- Treesitter ====================================================================================
|
||||
-- TODO: 2022-06-19 Treesitter is too slow on large C++ files
|
||||
-- require('nvim-treesitter.configs').setup {
|
||||
-- ensure_installed = { "c", "cpp" }, -- A list of parser names, or "all"
|
||||
@ -103,8 +101,7 @@ lua <<EOF
|
||||
-- },
|
||||
-- }
|
||||
|
||||
-- Vim Options
|
||||
-- ===========================================================================
|
||||
-- Vim Options ===================================================================================
|
||||
vim.opt.autowrite=true -- Automatically save before cmds like :next and :prev
|
||||
vim.opt.colorcolumn={80, 100} -- Set a 80 and 100 char column ruler
|
||||
vim.opt.completeopt={'menu', 'menuone', 'noselect'}
|
||||
@ -240,8 +237,7 @@ lua <<EOF
|
||||
]]
|
||||
EOF
|
||||
|
||||
" Theme
|
||||
" ==============================================================================
|
||||
" Theme ============================================================================================
|
||||
let g:gruvbox_material_background='hard'
|
||||
let g:gruvbox_material_foreground='mix'
|
||||
let g:gruvbox_material_disable_italic_comment=1
|
||||
@ -265,8 +261,7 @@ let g:cpp_member_highlight = 0
|
||||
" (affects both C and C++ files)
|
||||
let g:cpp_simple_highlight = 1
|
||||
|
||||
" Options
|
||||
" ==============================================================================
|
||||
" Options ==========================================================================================
|
||||
" Show EOL type and last modified timestamp, right after the filename
|
||||
set statusline=%<%F%h%m%r\ [%{&ff}]\ (%{strftime(\"%H:%M\ %d/%m/%Y\",getftime(expand(\"%:p\")))})%=%l,%c%V\ %P
|
||||
|
||||
@ -285,8 +280,7 @@ if has('mouse')
|
||||
set mouse=a
|
||||
endif
|
||||
|
||||
" Functions
|
||||
" ==============================================================================
|
||||
" Functions ========================================================================================
|
||||
" Increase font size using (Ctrl+Up Arrow) or (Ctrl+Down Arrow) if we are using
|
||||
" gvim Otherwise font size is determined in terminal
|
||||
nnoremap <C-Up> :silent! let &guifont = substitute(
|
||||
@ -342,8 +336,7 @@ nnoremap <silent> <S-F5> <cmd>RemedyBGStopDebugging<cr><cr>
|
||||
nnoremap <silent> <F9> <cmd>RemedyBGAddBreakpointAtFile<cr><cr>
|
||||
nnoremap <silent> <C-F10> <cmd>RemedyBGRunToCursor<cr><cr>
|
||||
|
||||
" FZF
|
||||
" ==============================================================================
|
||||
" FZF ==============================================================================================
|
||||
" Empty value to disable preview window altogether
|
||||
let g:fzf_preview_window = []
|
||||
|
||||
@ -359,8 +352,7 @@ command! -nargs=* -bang FzfCustomRG call RipgrepFzf(<q-args>, <bang>0)
|
||||
command! -bang -nargs=? -complete=dir FzfCustomFiles
|
||||
\ call fzf#vim#files(<q-args>, {'options': ['--layout=reverse', '--info=inline', '--preview', 'cat {}']}, <bang>0)
|
||||
|
||||
" General Key Bindings
|
||||
" ==============================================================================
|
||||
" General Key Bindings =============================================================================
|
||||
" FZF Bindings
|
||||
nnoremap <leader>h <cmd>FzfHistory<cr>
|
||||
nnoremap <leader>f <cmd>FzfCustomFiles<cr>
|
||||
@ -412,15 +404,13 @@ nnoremap <leader>s :vs<CR>
|
||||
nnoremap <A-j> :cn<CR>
|
||||
nnoremap <A-k> :cp<CR>
|
||||
|
||||
" Vim Dispatch
|
||||
" ==============================================================================
|
||||
" Vim Dispatch =====================================================================================
|
||||
let s:running_windows = has("win16") || has("win32") || has("win64")
|
||||
if s:running_windows
|
||||
set makeprg=build
|
||||
nnoremap <C-b> :Make ./build.bat<cr>
|
||||
set makeprg=build.bat
|
||||
else
|
||||
" Set vim terminal to enter normal mode using escape like normal vim behaviour
|
||||
tnoremap <Esc> <C-\><C-n>
|
||||
nnoremap <C-b> :Make ./build.sh<cr>
|
||||
set makeprg=./build.sh
|
||||
endif
|
||||
nnoremap <C-b> :Make<cr>
|
||||
|
@ -1359,4 +1359,83 @@ def get_manifest(is_windows):
|
||||
],
|
||||
})
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
version = "3.52.0"
|
||||
symlink = []
|
||||
|
||||
if is_windows:
|
||||
exe_path = "losslesscut.exe"
|
||||
download_url = f"https://github.com/mifi/lossless-cut/releases/download/v{version}/LosslessCut-win-x64.7z"
|
||||
download_checksum = "fa554d5f63f7287d6b4b6bf19ac5916c99cabfe9ac22248e7a3c39898c5b56ff"
|
||||
checksum = "3cae40fa13523e9dfe760521d167174ddfc21105eb20466e905eb39b74e8ed70"
|
||||
else:
|
||||
exe_path = f"LosslessCut-linux-x86_64.AppImage"
|
||||
download_url = f"https://github.com/mifi/lossless-cut/releases/download/v{version}/{exe_path}"
|
||||
download_checksum = "28daafe9fcd07473f460c0a903164efe93d4e5ce7e682b6f318a5550c34bdb99"
|
||||
checksum = download_checksum
|
||||
|
||||
result.append({
|
||||
"label": "LosslessCut",
|
||||
"manifests": [
|
||||
{
|
||||
"download_url": download_url,
|
||||
"download_checksum": download_checksum,
|
||||
"version": version,
|
||||
"unzip_method": 'default',
|
||||
"executables": [
|
||||
{
|
||||
"path": exe_path,
|
||||
"symlink": symlink,
|
||||
"add_to_devenv_path": False,
|
||||
"checksum": checksum,
|
||||
}
|
||||
],
|
||||
"add_to_devenv_script": [],
|
||||
}
|
||||
],
|
||||
})
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
version = "1.20.1"
|
||||
download_url = ""
|
||||
download_checksum = ""
|
||||
exe_path = ""
|
||||
checksum = ""
|
||||
|
||||
if is_windows:
|
||||
exe_path = "bin/go.exe"
|
||||
download_url = f"https://go.dev/dl/go{version}.windows-amd64.zip"
|
||||
download_checksum = "3b493969196a6de8d9762d09f5bc5ae7a3e5814b0cfbf9cc26838c2bc1314f9c"
|
||||
checksum = "89fc8e2c47f2a2a9138e60159781ce377167cf61e30d8136fbad0d77ac9303ed"
|
||||
symlink = [f"go-{version}.exe"]
|
||||
else:
|
||||
exe_path = f"bin/go"
|
||||
download_url = f"https://go.dev/dl/go{version}.linux-amd64.tar.gz"
|
||||
download_checksum = "000a5b1fca4f75895f78befeb2eecf10bfff3c428597f3f1e69133b63b911b02"
|
||||
checksum = "dfaaf2d9212757e0c305c9554f616cac6744de646ef6ef20f5eaf9d9634771c3"
|
||||
symlink = [f"go-{version}"]
|
||||
|
||||
result.append({
|
||||
"label": "Go",
|
||||
"manifests": [
|
||||
{
|
||||
"download_url": download_url,
|
||||
"download_checksum": download_checksum,
|
||||
"version": version,
|
||||
"unzip_method": 'default',
|
||||
"executables": [
|
||||
{
|
||||
"path": exe_path,
|
||||
"symlink": symlink,
|
||||
"add_to_devenv_path": True,
|
||||
"checksum": checksum,
|
||||
}
|
||||
],
|
||||
"add_to_devenv_script": [],
|
||||
}
|
||||
],
|
||||
})
|
||||
|
||||
return result
|
||||
|
24
install.py
24
install.py
@ -271,8 +271,7 @@ if wezterm.target_triple == "x86_64-pc-windows-msvc" then
|
||||
|
||||
clink_exe = string.format("%s\\\\..\\\\..\\\\{clink_exe_path_for_wezterm}", wezterm.executable_dir)
|
||||
devenv_bat = string.format("%s\\\\..\\\\..\\\\{dev_env_script_name}.bat", wezterm.executable_dir)
|
||||
msvc_bat = string.format("%s\\\\..\\\\..\\\\msvc\\\\msvc-{msvc_version}.bat", wezterm.executable_dir)
|
||||
win10_sdk_bat = string.format("%s\\\\..\\\\..\\\\msvc\\\\win-sdk-{win10_sdk_version}.bat", wezterm.executable_dir)
|
||||
msvc_bat = "C:\\\\Program Files\\\\Microsoft Visual Studio\\\\2022\\\\Community\\\\VC\\\\Auxiliary\\\\Build\\\\vcvarsall.bat"
|
||||
clink_profile = string.format("%s\\\\..\\\\..\\\\{clink_profile_path_for_wezterm}", wezterm.executable_dir)
|
||||
|
||||
-- Taken from: https://wezfurlong.org/wezterm/shell-integration.html
|
||||
@ -283,8 +282,7 @@ if wezterm.target_triple == "x86_64-pc-windows-msvc" then
|
||||
default_prog = {{"cmd.exe", "/s", "/k",
|
||||
clink_exe, "inject", "--profile", clink_profile, "-q",
|
||||
"&&", "call", devenv_bat,
|
||||
"&&", "call", msvc_bat,
|
||||
"&&", "call", win10_sdk_bat}}
|
||||
"&&", "call", msvc_bat, "x64"}}
|
||||
end
|
||||
|
||||
return {{
|
||||
@ -381,22 +379,26 @@ pause
|
||||
internal_dir = pathlib.Path(os.path.dirname(os.path.abspath(__file__))) / "Internal"
|
||||
if is_windows:
|
||||
devenver.print_header("Use LLVM utils script to slim installation size")
|
||||
install_dir_set = set()
|
||||
llvm_install_dir_set = set()
|
||||
for entry in installed_dev_apps["LLVM"]:
|
||||
install_dir = entry['install_dir']
|
||||
install_dir_set.add(install_dir)
|
||||
llvm_install_dir_set.add(entry['install_dir'])
|
||||
|
||||
llvm_script_src_path = internal_dir / "win_llvm-link-ad01970-2022-08-29.bat"
|
||||
for install_dir in install_dir_set:
|
||||
llvm_script_dest_path = install_dir / "llvm-link.bat"
|
||||
for llvm_install_dir in llvm_install_dir_set:
|
||||
llvm_script_dest_path = llvm_install_dir / "llvm-link.bat"
|
||||
shutil.copy(llvm_script_src_path, llvm_script_dest_path)
|
||||
subprocess.run(llvm_script_dest_path, cwd=install_dir)
|
||||
subprocess.run(llvm_script_dest_path, cwd=llvm_install_dir)
|
||||
os.remove(llvm_script_dest_path)
|
||||
|
||||
# Install left-overs
|
||||
# --------------------------------------------------------------------------
|
||||
devenver.print_header("Install configuration files")
|
||||
shutil.copy(internal_dir / "os_clang_format_style_file", install_dir / "_clang-format")
|
||||
|
||||
# ClangFormat
|
||||
clang_format_src_path = internal_dir / "os_clang_format_style_file"
|
||||
clang_format_dest_path = install_dir / "_clang-format"
|
||||
devenver.lprint(f"Copying clang-format file from {clang_format_src_path} to {clang_format_dest_path}")
|
||||
shutil.copy(clang_format_src_path, clang_format_dest_path)
|
||||
|
||||
# Copy init.vim to NVIM directory
|
||||
nvim_init_dir = ""
|
||||
|
Loading…
Reference in New Issue
Block a user