Add editor tooling configuration

clangd fallback flags, clang-format style, clang-tidy checks, and gitignore for the autotools-generated artifacts.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <[email protected]>
This commit is contained in:
2026-08-30 04:09:45 -04:00
co-authored by Sisyphus
parent b3b065c325
commit 6768ec36e7
4 changed files with 90 additions and 23 deletions
+15
View File
@@ -0,0 +1,15 @@
# .clang-format — nulsl-libc style.
#
# Rule of thumb: 4-space indent, 100 columns, allman braces off, keep it
# boring. Run `clang-format -i` on your diff before opening a PR.
BasedOnStyle: LLVM
IndentWidth: 4
ColumnLimit: 100
PointerAlignment: Left
DerivePointerAlignment: false
SortIncludes: true
BreakBeforeBraces: Attach
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
+19
View File
@@ -0,0 +1,19 @@
# .clang-tidy — nulsl-libc lint configuration.
#
# The linter's job is to yell about bugs, not style (style belongs to
# clang-format). Keep the check list tight and useful.
# A libc owns the reserved namespace by definition (_exit, environ, ...);
# bugprone-reserved-identifier only makes sense for application code.
Checks: >
clang-analyzer-*,
bugprone-*,
performance-*,
portability-*,
-bugprone-easily-swappable-parameters,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-reserved-identifier
WarningsAsErrors: ''
HeaderFilterRegex: 'include/.*'
FormatStyle: file
+19
View File
@@ -0,0 +1,19 @@
# .clangd — LSP configuration for nulsl-libc.
#
# Fallback flags used when compile_commands.json is absent. After running
# `make compile_commands` (requires bear), clangd uses the exact build
# flags from bin/release/ instead, and these are merged on top.
CompileFlags:
Compiler: clang
Add:
- -std=c17
- -Iinclude
- -ffreestanding
- -fno-builtin
- -Wall
- -Wextra
# Treat all headers as project headers so warnings apply inside them.
Diagnostics:
Suppress:
- unknown-pragmas
+37 -23
View File
@@ -1,49 +1,50 @@
# ---> C
# Prerequisites
*.d
# Generated by autotools
aclocal.m4
autom4te.cache/
build-aux/
config.guess
config.h.in
config.log
config.status
config.sub
configure
configure.lineno
depcomp
install-sh
ltmain.sh
missing
Makefile.in
# Object files
# Build artifacts
*.o
*.a
*.lo
*.la
.deps/
.libs/
# Generic C artifacts (for experiments outside the autotools flow)
*.ko
*.obj
*.elf
# Linker output
*.ilk
*.map
*.exp
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
# Debug files
*.dSYM/
*.su
*.idb
*.pdb
# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
@@ -52,3 +53,16 @@ Module.symvers
Mkfile.old
dkms.conf
# Out-of-tree build dirs (the driver Makefile owns these)
bin/release/*
!bin/release/.gitkeep
bin/debug/*
!bin/debug/.gitkeep
# LSP (generated by `make compile_commands`)
compile_commands.json
# Editor/agent caches
.cache/
.omo/
*~