diff --git a/flake.lock b/flake.lock index f5d941f..a45ba0b 100644 --- a/flake.lock +++ b/flake.lock @@ -181,11 +181,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1743095683, - "narHash": "sha256-gWd4urRoLRe8GLVC/3rYRae1h+xfQzt09xOfb0PaHSk=", + "lastModified": 1747542820, + "narHash": "sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5e5402ecbcb27af32284d4a62553c019a3a49ea6", + "rev": "292fa7d4f6519c074f0a50394dbbe69859bb6043", "type": "github" }, "original": { diff --git a/nvim/ftplugin/cs.lua b/nvim/ftplugin/cs.lua index 7b9bb8a..58c1506 100644 --- a/nvim/ftplugin/cs.lua +++ b/nvim/ftplugin/cs.lua @@ -8,9 +8,36 @@ vim.bo.expandtab = true local lsp = require('user.lsp') +-- TODO: make a helper function that does the wildcard matching to find the root dir +local root_files = { + '.git', + -- '*.sln', + -- '*.csproj', + -- 'omnisharp.json', +} + vim.lsp.start { name = 'roslyn', - cmd = { 'OmniSharp', '-z', 'DotNet:enablePackageRestore=false', '--encoding', 'utf-8', '--languageserver' }, + cmd = { + 'OmniSharp', + '-z', + 'DotNet:enablePackageRestore=false', + '--encoding', + 'utf-8', + '--languageserver', + }, + root_dir = vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1]), capabilities = lsp.make_client_capabilities(), on_attach = lsp.on_attach, + settings = { + FormattingOptions = { + EnableEditorConfigSupport = true, + }, + MsBuild = {}, + RenameOptions = {}, + RoslynExtensionsOptions = {}, + Sdk = { + IncludePrereleases = true, + }, + }, } diff --git a/nvim/init.lua b/nvim/init.lua index 79b8c5a..13d85e2 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -107,6 +107,13 @@ cmd.packadd('cfilter') -- Allows filtering the quickfix list with :cfdo -- let sqlite.lua (which some plugins depend on) know where to find sqlite vim.g.sqlite_clib_path = require('luv').os_getenv('LIBSQLITE') +vim.filetype.add { + extension = { + razor = 'cs', + cshtml = 'cs', + }, +} + -- Vim Theme -- require('catppuccin').setup { -- flavour = 'macchiato', diff --git a/nvim/plugin/base16.lua b/nvim/plugin/base16.lua index 94ff2f5..78caf83 100644 --- a/nvim/plugin/base16.lua +++ b/nvim/plugin/base16.lua @@ -1,6 +1,25 @@ local colors_file = io.open(os.getenv('HOME') .. '/.cache/mutagen/colors.json', 'r') if not colors_file then - -- vim.notify('Mutagen colors file not found', vim.log.levels.ERROR) + local base16_colors = { + base00 = '#131313', + base01 = '#1f1f1f', + base02 = '#2a2a2a', + base03 = '#919191', + base04 = '#c6c6c6', + base05 = '#e2e2e2', + base06 = '#e2e2e2', + base07 = '#303030', + base08 = '#ffb4ab', + base09 = '#dec38c', + base0A = '#e7bdb6', + base0B = '#ffb4a8', + base0C = '#705c2e', + base0D = '#9c4236', + base0E = '#775651', + base0F = '#ba1a1a', + } + + require('base16-colorscheme').setup(base16_colors) return end