Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@

*.rs linguist-language=Rust

*.html linguist-detectable=false
*.sh linguist-detectable=false
*.vimrc linguist-detectable=false
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# directories (by name)

/_build/
/_build-ci/
/scripts/__pycache__/
/scratch/
/target/
Expand All @@ -14,8 +15,6 @@

.DS_Store

#Cargo.lock


# files (by pattern)

Expand Down
72 changes: 68 additions & 4 deletions .vimrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,70 @@
" Synesis C/C++ project .vimrc — aligned with .sis/.vscode/c_cxx/settings.json

set nocompatible
filetype indent plugin on
syntax enable
set autoindent
set expandtab
set shiftwidth=4
set softtabstop=4
set tabstop=4
set backspace=indent,eol,start
set hlsearch
set incsearch
set number

" files.insertFinalNewline
set eol
set fixeol

" editor.renderWhitespace: all
set list
set listchars=tab:->,trail:-,extends:>,precedes:<,nbsp:+

" editor.detectIndentation: false — global defaults (editor.tabSize: 2, insertSpaces: false)
set tabstop=2
set shiftwidth=2
set softtabstop=2
set noexpandtab
set colorcolumn=76

" colorcolumn draws a full-column tint in Vim (not a VS Code-style 1px line).
" Keep it subtle via the ColorColumn highlight group; reapply after colorscheme changes.
if has('termguicolors')
" set termguicolors
endif

function! s:ConfigureColorColumn() abort
highlight ColorColumn ctermbg=236 guibg=#2a2a2a cterm=NONE gui=NONE
endfunction

call s:ConfigureColorColumn()
autocmd ColorScheme * call s:ConfigureColorColumn()

" files.trimTrailingWhitespace
autocmd BufWritePre * %s/\s\+$//e

augroup sis_c_cxx
autocmd!

" [c] / [cpp]
autocmd FileType c,cpp setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,64,68,72,76

" [rust]
autocmd FileType rs setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=76

" [cmake]
autocmd FileType cmake setlocal noexpandtab tabstop=4 shiftwidth=4 softtabstop=4

" [shellscript]
autocmd FileType sh,bash,zsh setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 colorcolumn=60,76

" [bat]
autocmd FileType bat,dosbatch setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,76

" [json] / [markdown] / [yaml] / [ruby]
autocmd FileType json,markdown,yaml,ruby setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2

" [python]
autocmd FileType python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,76

" [toml]
autocmd FileType toml setlocal noexpandtab tabstop=2 shiftwidth=2 softtabstop=2
augroup END

8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
{
"[json]": {
"editor.insertSpaces": false,
"editor.tabSize": 2,
},
"[markdown]": {
"editor.insertSpaces": true,
"editor.tabSize": 2,
},
"[python]": {
"editor.insertSpaces": true,
"editor.rulers": [ 60, 76 ],
"editor.tabSize": 2,
"editor.tabSize": 4,
},
"[ruby]": {
"editor.insertSpaces": true,
Expand All @@ -25,6 +30,7 @@
"editor.detectIndentation": false,
"editor.insertSpaces": false,
"editor.renderWhitespace": "all",
"editor.rulers": [ 76 ],
"editor.tabSize": 2,
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
Expand Down
2 changes: 1 addition & 1 deletion EXAMPLES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# shwild.Rust Examples
# shwild.Rust Examples <!-- omit it toc -->

|Name|Source & Description|Summary|
|---|---|---|
Expand Down
6 changes: 2 additions & 4 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
BSD 3-Clause License - shwild.Rust

Copyright (c) 2019-2024, Matthew Wilson and Synesis Information Systems
Copyright (c) 2019-2026, Matthew Wilson and Synesis Information Systems
Copyright (c) 2005-2019, Matthew Wilson and Sean Kelly

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
Expand Down
10 changes: 7 additions & 3 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@

# rustfmt.toml for shwild.Rust
#
# Requires nightly rustfmt with unstable features enabled — use ./scripts/fmt
# Requires nightly rustfmt with unstable features enabled, e.g.:
#
# ./scripts/fmt
#
# Or:
#
# RUSTFMT="$(rustup which --toolchain nightly rustfmt)" cargo fmt -- --unstable-features
#
# configured for cargo-fmt 1.84.0

# array_width=60 # deprecated
# attr_fn_like_width=70 # deprecated
binop_separator="Front"
Expand Down
Loading