Skip to content

Commit ff70fad

Browse files
feat:🎁 add ftdetect for .props (#186)
Co-authored-by: Victor Molostov <[email protected]> Co-authored-by: Gustav Eikaas <[email protected]> Co-authored-by: Gustav Eikaas <[email protected]>
1 parent c4c407b commit ff70fad

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

lua/easy-dotnet/filetypes.lua

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
local M = {}
2+
3+
M.enable_filetypes = function()
4+
vim.filetype.add({
5+
extension = {
6+
props = "xml",
7+
},
8+
})
9+
end
10+
11+
return M

lua/easy-dotnet/init.lua

+2
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ M.setup = function(opts)
158158

159159
if merged_opts.auto_bootstrap_namespace.enabled == true then require("easy-dotnet.cs-mappings").auto_bootstrap_namespace(merged_opts.auto_bootstrap_namespace.type) end
160160

161+
if merged_opts.enable_filetypes == true then require("easy-dotnet.filetypes").enable_filetypes() end
162+
161163
if merged_opts.test_runner.enable_buffer_test_execution then
162164
require("easy-dotnet.cs-mappings").add_test_signs()
163165
require("easy-dotnet.fs-mappings").add_test_signs()

lua/easy-dotnet/options.lua

+1
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ local M = {
127127
},
128128
csproj_mappings = true,
129129
fsproj_mappings = true,
130+
enable_filetypes = true,
130131
auto_bootstrap_namespace = {
131132
type = "block_scoped",
132133
enabled = true,

0 commit comments

Comments
 (0)