From 3d68f6fb6544edc6b896b1de66120ff23ea7f17c Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Wed, 17 Jul 2024 21:56:05 +0200 Subject: [PATCH] Add .editorconfig --- config/nvim/after/ftplugin/editorconfig.lua | 1 + config/nvim/lua/fschauen/filetype.lua | 1 + home/editorconfig | 16 ++++++++++++++++ install.sh | 13 +++++++------ 4 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 config/nvim/after/ftplugin/editorconfig.lua create mode 100644 home/editorconfig diff --git a/config/nvim/after/ftplugin/editorconfig.lua b/config/nvim/after/ftplugin/editorconfig.lua new file mode 100644 index 0000000..e3c5666 --- /dev/null +++ b/config/nvim/after/ftplugin/editorconfig.lua @@ -0,0 +1 @@ +vim.bo.commentstring = '# %s' diff --git a/config/nvim/lua/fschauen/filetype.lua b/config/nvim/lua/fschauen/filetype.lua index d6a752c..67ad8bf 100644 --- a/config/nvim/lua/fschauen/filetype.lua +++ b/config/nvim/lua/fschauen/filetype.lua @@ -7,6 +7,7 @@ M.setup = function() [".*/ssh/config"] = "sshconfig", [".*/git/config"] = "gitconfig", [".*gitconfig"] = "gitconfig", + [".*/home/editorconfig"] = "editorconfig", [".*config/zsh/.*"] = "zsh", }, } diff --git a/home/editorconfig b/home/editorconfig new file mode 100644 index 0000000..024ed80 --- /dev/null +++ b/home/editorconfig @@ -0,0 +1,16 @@ +root = true + +[*] +insert_final_newline = true + +[*.cs] + +# Prefer expression body for methods when they will be a single line, but never +# warn me either way. +dotnet_diagnostic.IDE0022.severity = none +csharp_style_expression_bodied_methods = when_on_single_line + +# Allow me to use either file-scoped or block-scoped namespace declarations +# without warnings. +dotnet_diagnostic.IDE0160.severity = none +dotnet_diagnostic.IDE0161.severity = none diff --git a/install.sh b/install.sh index 0e4773b..f683ed5 100755 --- a/install.sh +++ b/install.sh @@ -135,12 +135,13 @@ execute() { make_dir "$DESTDIR/.local/share/zsh/" heading 'create links' - make_link "$DESTDIR/.XCompose" "$dotfiles/home/XCompose" - make_link "$DESTDIR/.bin" "$dotfiles/bin" - make_link "$DESTDIR/.config" "$dotfiles/config" - make_link "$DESTDIR/.hushlogin" "$dotfiles/home/hushlogin" - make_link "$DESTDIR/.ssh/config" "$dotfiles/ssh/config" - make_link "$DESTDIR/.zshenv" "$dotfiles/home/zshenv" + make_link "$DESTDIR/.XCompose" "$dotfiles/home/XCompose" + make_link "$DESTDIR/.bin" "$dotfiles/bin" + make_link "$DESTDIR/.config" "$dotfiles/config" + make_link "$DESTDIR/.editorconfig" "$dotfiles/home/editorconfig" + make_link "$DESTDIR/.hushlogin" "$dotfiles/home/hushlogin" + make_link "$DESTDIR/.ssh/config" "$dotfiles/ssh/config" + make_link "$DESTDIR/.zshenv" "$dotfiles/home/zshenv" heading 'git user configuration' make_git_user_config