Compare commits

..

3 Commits

Author SHA1 Message Date
doylet
ba71eb1558 linux: Add Go checksum for 1.20.1 2023-10-09 11:02:49 +11:00
doylet
5fc23cd47c Use installed MSVC 2023-10-09 11:02:49 +11:00
doyle
4f9a56d495 Add go 1.20.1 2023-10-09 11:02:49 +11:00
3 changed files with 42 additions and 39 deletions

View File

@ -1,7 +1,8 @@
Language: Cpp ---
IndentWidth: 4 IndentWidth: 4
TabWidth: 4 TabWidth: 4
---
Language: Cpp
# Align parameters on the open bracket, e.g.: # Align parameters on the open bracket, e.g.:
# someLongFunction(argument1, # someLongFunction(argument1,
@ -26,10 +27,10 @@ AlignArrayOfStructures: Left
# int d = 3; # int d = 3;
# /* A comment. */ # /* A comment. */
# double e = 4; # double e = 4;
AlignConsecutiveAssignments: Consecutive AlignConsecutiveAssignments: Consecutive
AlignConsecutiveBitFields: Consecutive AlignConsecutiveBitFields: Consecutive
AlignConsecutiveDeclarations: Consecutive AlignConsecutiveDeclarations: Consecutive
AlignConsecutiveMacros: Consecutive AlignConsecutiveMacros: Consecutive
# Align escaped newlines as far left as possible. # Align escaped newlines as far left as possible.
# #define A \ # #define A \
@ -134,7 +135,7 @@ AlwaysBreakTemplateDeclarations: MultiLine
# aaaaaaaaaaaaaaaaaaaa, # aaaaaaaaaaaaaaaaaaaa,
# aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa); # aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
# } # }
BinPackArguments: false BinPackArguments: false
BinPackParameters: false # As BinPackArguments but for function definition parameters BinPackParameters: false # As BinPackArguments but for function definition parameters
# Add space after the : only (space may be added before if needed for # Add space after the : only (space may be added before if needed for
@ -196,7 +197,7 @@ BreakInheritanceList: AfterComma
# "ryVeryVeryVeryVeryVery" # "ryVeryVeryVeryVeryVery"
# "VeryLongString"; # "VeryLongString";
BreakStringLiterals: true BreakStringLiterals: true
ColumnLimit: 0 ColumnLimit: 100
# false: # false:
# namespace Foo { # namespace Foo {
@ -327,10 +328,6 @@ NamespaceIndentation: None
PackConstructorInitializers: CurrentLine PackConstructorInitializers: CurrentLine
PointerAlignment: Right PointerAlignment: Right
# Different ways to arrange specifiers and qualifiers (e.g. const/volatile).
QualifierAlignment: Custom
QualifierOrder: ['inline', 'static', 'type', 'const', 'volatile']
# false: # false:
# // veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with plenty of information # // veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with plenty of information
# /* second veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with plenty of information */ # /* second veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with plenty of information */

View File

@ -1,4 +1,5 @@
" Plugins ========================================================================================== " Plugins
" ==============================================================================
call plug#begin(stdpath('config') . '/plugged') call plug#begin(stdpath('config') . '/plugged')
" nerdtree provides a file tree explorer " nerdtree provides a file tree explorer
" vim-dispatch allows running async jobs in vim (i.e. builds in the background) " vim-dispatch allows running async jobs in vim (i.e. builds in the background)
@ -25,7 +26,6 @@ call plug#begin(stdpath('config') . '/plugged')
" Lua cache to speed up load times " Lua cache to speed up load times
Plug 'https://github.com/lewis6991/impatient.nvim' Plug 'https://github.com/lewis6991/impatient.nvim'
Plug 'https://github.com/ggandor/leap.nvim'
" lsp-zero begin " lsp-zero begin
" LSP Support " LSP Support
@ -50,16 +50,16 @@ call plug#begin(stdpath('config') . '/plugged')
" lsp-zero end " lsp-zero end
call plug#end() call plug#end()
" Lua Setup ======================================================================================== " Lua Setup
" ==============================================================================
lua <<EOF lua <<EOF
require('impatient') 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 lsp = require('lsp-zero')
local devenver_root = vim.fn.getenv('devenver_root') local devenver_root = vim.fn.getenv('devenver_root')
local clang_format_fallback_file = devenver_root .. '/_clang-format'
lsp.preset('recommended') lsp.preset('recommended')
lsp.configure('clangd', { lsp.configure('clangd', {
cmd = { cmd = {
@ -72,12 +72,14 @@ lua <<EOF
"--clang-tidy", "--clang-tidy",
"--header-insertion=iwyu", "--header-insertion=iwyu",
"--header-insertion-decorators", "--header-insertion-decorators",
"--fallback-style=" .. clang_format_fallback_file,
} }
}) })
lsp.setup() lsp.setup()
-- Treesitter ==================================================================================== -- Treesitter
-- ===========================================================================
-- TODO: 2022-06-19 Treesitter is too slow on large C++ files -- TODO: 2022-06-19 Treesitter is too slow on large C++ files
-- require('nvim-treesitter.configs').setup { -- require('nvim-treesitter.configs').setup {
-- ensure_installed = { "c", "cpp" }, -- A list of parser names, or "all" -- ensure_installed = { "c", "cpp" }, -- A list of parser names, or "all"
@ -101,7 +103,8 @@ lua <<EOF
-- }, -- },
-- } -- }
-- Vim Options =================================================================================== -- Vim Options
-- ===========================================================================
vim.opt.autowrite=true -- Automatically save before cmds like :next and :prev 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.colorcolumn={80, 100} -- Set a 80 and 100 char column ruler
vim.opt.completeopt={'menu', 'menuone', 'noselect'} vim.opt.completeopt={'menu', 'menuone', 'noselect'}
@ -237,7 +240,8 @@ lua <<EOF
]] ]]
EOF EOF
" Theme ============================================================================================ " Theme
" ==============================================================================
let g:gruvbox_material_background='hard' let g:gruvbox_material_background='hard'
let g:gruvbox_material_foreground='mix' let g:gruvbox_material_foreground='mix'
let g:gruvbox_material_disable_italic_comment=1 let g:gruvbox_material_disable_italic_comment=1
@ -261,7 +265,8 @@ let g:cpp_member_highlight = 0
" (affects both C and C++ files) " (affects both C and C++ files)
let g:cpp_simple_highlight = 1 let g:cpp_simple_highlight = 1
" Options ========================================================================================== " Options
" ==============================================================================
" Show EOL type and last modified timestamp, right after the filename " 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 set statusline=%<%F%h%m%r\ [%{&ff}]\ (%{strftime(\"%H:%M\ %d/%m/%Y\",getftime(expand(\"%:p\")))})%=%l,%c%V\ %P
@ -280,7 +285,8 @@ if has('mouse')
set mouse=a set mouse=a
endif endif
" Functions ======================================================================================== " Functions
" ==============================================================================
" Increase font size using (Ctrl+Up Arrow) or (Ctrl+Down Arrow) if we are using " Increase font size using (Ctrl+Up Arrow) or (Ctrl+Down Arrow) if we are using
" gvim Otherwise font size is determined in terminal " gvim Otherwise font size is determined in terminal
nnoremap <C-Up> :silent! let &guifont = substitute( nnoremap <C-Up> :silent! let &guifont = substitute(
@ -336,7 +342,8 @@ nnoremap <silent> <S-F5> <cmd>RemedyBGStopDebugging<cr><cr>
nnoremap <silent> <F9> <cmd>RemedyBGAddBreakpointAtFile<cr><cr> nnoremap <silent> <F9> <cmd>RemedyBGAddBreakpointAtFile<cr><cr>
nnoremap <silent> <C-F10> <cmd>RemedyBGRunToCursor<cr><cr> nnoremap <silent> <C-F10> <cmd>RemedyBGRunToCursor<cr><cr>
" FZF ============================================================================================== " FZF
" ==============================================================================
" Empty value to disable preview window altogether " Empty value to disable preview window altogether
let g:fzf_preview_window = [] let g:fzf_preview_window = []
@ -352,7 +359,8 @@ command! -nargs=* -bang FzfCustomRG call RipgrepFzf(<q-args>, <bang>0)
command! -bang -nargs=? -complete=dir FzfCustomFiles command! -bang -nargs=? -complete=dir FzfCustomFiles
\ call fzf#vim#files(<q-args>, {'options': ['--layout=reverse', '--info=inline', '--preview', 'cat {}']}, <bang>0) \ call fzf#vim#files(<q-args>, {'options': ['--layout=reverse', '--info=inline', '--preview', 'cat {}']}, <bang>0)
" General Key Bindings ============================================================================= " General Key Bindings
" ==============================================================================
" FZF Bindings " FZF Bindings
nnoremap <leader>h <cmd>FzfHistory<cr> nnoremap <leader>h <cmd>FzfHistory<cr>
nnoremap <leader>f <cmd>FzfCustomFiles<cr> nnoremap <leader>f <cmd>FzfCustomFiles<cr>
@ -404,13 +412,15 @@ nnoremap <leader>s :vs<CR>
nnoremap <A-j> :cn<CR> nnoremap <A-j> :cn<CR>
nnoremap <A-k> :cp<CR> nnoremap <A-k> :cp<CR>
" Vim Dispatch ===================================================================================== " Vim Dispatch
" ==============================================================================
let s:running_windows = has("win16") || has("win32") || has("win64") let s:running_windows = has("win16") || has("win32") || has("win64")
if s:running_windows if s:running_windows
set makeprg=build.bat set makeprg=build
nnoremap <C-b> :Make ./build.bat<cr>
else else
" Set vim terminal to enter normal mode using escape like normal vim behaviour " Set vim terminal to enter normal mode using escape like normal vim behaviour
tnoremap <Esc> <C-\><C-n> tnoremap <Esc> <C-\><C-n>
nnoremap <C-b> :Make ./build.sh<cr>
set makeprg=./build.sh set makeprg=./build.sh
endif endif
nnoremap <C-b> :Make<cr>

View File

@ -379,26 +379,22 @@ pause
internal_dir = pathlib.Path(os.path.dirname(os.path.abspath(__file__))) / "Internal" internal_dir = pathlib.Path(os.path.dirname(os.path.abspath(__file__))) / "Internal"
if is_windows: if is_windows:
devenver.print_header("Use LLVM utils script to slim installation size") devenver.print_header("Use LLVM utils script to slim installation size")
llvm_install_dir_set = set() install_dir_set = set()
for entry in installed_dev_apps["LLVM"]: for entry in installed_dev_apps["LLVM"]:
llvm_install_dir_set.add(entry['install_dir']) install_dir = entry['install_dir']
install_dir_set.add(install_dir)
llvm_script_src_path = internal_dir / "win_llvm-link-ad01970-2022-08-29.bat" llvm_script_src_path = internal_dir / "win_llvm-link-ad01970-2022-08-29.bat"
for llvm_install_dir in llvm_install_dir_set: for install_dir in install_dir_set:
llvm_script_dest_path = llvm_install_dir / "llvm-link.bat" llvm_script_dest_path = install_dir / "llvm-link.bat"
shutil.copy(llvm_script_src_path, llvm_script_dest_path) shutil.copy(llvm_script_src_path, llvm_script_dest_path)
subprocess.run(llvm_script_dest_path, cwd=llvm_install_dir) subprocess.run(llvm_script_dest_path, cwd=install_dir)
os.remove(llvm_script_dest_path) os.remove(llvm_script_dest_path)
# Install left-overs # Install left-overs
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
devenver.print_header("Install configuration files") 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 # Copy init.vim to NVIM directory
nvim_init_dir = "" nvim_init_dir = ""