From d2c56360d917989aa3d912beee5550c65446134b Mon Sep 17 00:00:00 2001 From: Pratik Tripathy Date: Fri, 28 Jun 2024 11:15:45 +0530 Subject: [PATCH] Add support for dotnet + vscode config changes - NVim: Omnisharp LSP added - VSCode: gitgraph & dotnet specific configs + reorg configs --- common/.config/Code/User/settings.json | 46 ++++++++++---------- common/.config/nvim/lua/plugins/code-lsp.lua | 18 +++++++- common/.config/nvim/lua/plugins/dotnet.lua | 3 ++ 3 files changed, 44 insertions(+), 23 deletions(-) create mode 100644 common/.config/nvim/lua/plugins/dotnet.lua diff --git a/common/.config/Code/User/settings.json b/common/.config/Code/User/settings.json index 2cccbf8..28137da 100644 --- a/common/.config/Code/User/settings.json +++ b/common/.config/Code/User/settings.json @@ -8,7 +8,7 @@ "extensions.ignoreRecommendations": true, // Editor - "editor.fontSize": 21, // Reduces the Activity Bar size + "editor.fontSize": 18, "editor.cursorWidth": 4, "editor.minimap.enabled": false, "editor.wordWrap": "on", @@ -27,16 +27,18 @@ "files.autoSaveDelay": 1000, "diffEditor.renderSideBySide": true, "diffEditor.ignoreTrimWhitespace": false, + "terminal.integrated.shell.linux": "/bin/zsh", // Editor Font "editor.fontFamily": "JetBrainsMono Nerd Font", "editor.fontLigatures": true, "terminal.integrated.fontFamily": "JetBrainsMono Nerd Font", - "terminal.integrated.fontSize": 20, + "terminal.integrated.fontSize": 18, // Workbench - Everything that surrounds the editor "workbench.startupEditor": "newUntitledFile", "workbench.sideBar.location": "left", + "security.workspace.trust.untrustedFiles": "prompt", "workbench.colorCustomizations": { "tab.activeBackground": "#07f7af3f", "tab.activeBorder": "#ffffff" @@ -47,26 +49,24 @@ // Debugging "debug.toolBarLocation": "docked", + "debug.onTaskErrors": "debugAnyway", // NeoVIM - "keyboard.dispatch": "keyCode", // Hack to make CAPS->Esc remap work on Ubuntu - "extensions.experimental.affinity": { - "asvetliakov.vscode-neovim": 1 - }, - "vscode-neovim.logLevel": "warn", - "vscode-neovim.neovimExecutablePaths.linux": "/home/linuxbrew/.linuxbrew/bin/nvim", - "vscode-neovim.useWSL": true + // "keyboard.dispatch": "keyCode", // Hack to make CAPS->Esc remap work on Ubuntu + // "extensions.experimental.affinity": { + // "asvetliakov.vscode-neovim": 1 + // }, + // "vscode-neovim.logLevel": "warn", + // "vscode-neovim.neovimExecutablePaths.linux": "/home/linuxbrew/.linuxbrew/bin/nvim", + // "vscode-neovim.useWSL": true, // // Prettier Plugin "prettier.tabWidth": 4, - "editor.defaultFormatter": "esbenp.prettier-vscode", "prettier.useTabs": false, "prettier.printWidth": 85, - "[html]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[json]": { + "editor.defaultFormatter": "esbenp.prettier-vscode", + "[html,json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, @@ -124,7 +124,6 @@ // Shell check plugin "shellcheck.run": "onSave", "shellcheck.exclude": ["2181", "2039"], - "security.workspace.trust.untrustedFiles": "open", // Better Comments "better-comments.tags": [ @@ -177,11 +176,17 @@ // JavaScript "typescript.suggest.paths": false, + "debug.javascript.autoAttachFilter": "disabled", // Git "git.enableSmartCommit": true, "git.autofetch": true, "git.confirmSync": false, + "git-graph.dialog.addTag.pushToRemote": true, + "git-graph.dialog.createBranch.checkOut": true, + "git-graph.dialog.general.referenceInputSpaceSubstitution": "Underscore", + "git-graph.enhancedAccessibility": true, + "git-graph.dialog.rebase.launchInteractiveRebase": true, // Markdown "markdownlint.run": "onType", @@ -221,15 +226,10 @@ // "rust-analyzer.inlayHints.enable": false, // "rust-analyzer.inlayHints.typeHints": false, // - "terminal.integrated.shell.linux": "/bin/zsh", - "debug.javascript.autoAttachFilter": "disabled", - "debug.onTaskErrors": "debugAnyway", - "vim.disableExtension": true, - "window.zoomLevel": -1, // Dotnet & C# "[csharp]": { - "editor.defaultFormatter": "ms-dotnettools.csharp" + "editor.defaultFormatter": "csharpier.csharpier-vscode" }, "csharp.inlayHints.enableInlayHintsForImplicitObjectCreation": true, "csharp.inlayHints.enableInlayHintsForImplicitVariableTypes": true, @@ -241,5 +241,7 @@ "dotnet.inlayHints.enableInlayHintsForParameters": true, "dotnetAcquisitionExtension.enableTelemetry": false, "csharp.experimental.debug.hotReload": true, - + "dotnet.inlayHints.enableInlayHintsForOtherParameters": true, + "dotnet.backgroundAnalysis.compilerDiagnosticsScope": "fullSolution", + "dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "fullSolution" } diff --git a/common/.config/nvim/lua/plugins/code-lsp.lua b/common/.config/nvim/lua/plugins/code-lsp.lua index 931e4da..bcd2c6b 100644 --- a/common/.config/nvim/lua/plugins/code-lsp.lua +++ b/common/.config/nvim/lua/plugins/code-lsp.lua @@ -70,7 +70,23 @@ return { }, bashls = { filetypes = { "sh", "bash", "zsh" } }, html = { filetypes = { "html", "twig", "hbs" } }, - omnisharp = {}, + omnisharp = { + -- DotNet = { + -- enablePackageRestore = true, + -- }, + settings = { + FormattingOptions = { + OrganizeImports = true, + }, + RoslynExtensionOptions = { + EnableAnalyzerSupport = true, + EnableImportCompletion = true, + }, + Sdk = { + IncludePrereleases = false, + }, + }, + }, tsserver = { settings = { completions = { diff --git a/common/.config/nvim/lua/plugins/dotnet.lua b/common/.config/nvim/lua/plugins/dotnet.lua new file mode 100644 index 0000000..8d798a0 --- /dev/null +++ b/common/.config/nvim/lua/plugins/dotnet.lua @@ -0,0 +1,3 @@ +return { + -- { "OmniSharp/omnisharp-vim" }, +}