Refactor filetypes
This commit is contained in:
50
nvim/filetype.lua
Normal file
50
nvim/filetype.lua
Normal file
@ -0,0 +1,50 @@
|
||||
vim.api.nvim_create_augroup('FileTypeConfigs', { clear = true })
|
||||
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
group = 'FileTypeConfigs',
|
||||
pattern = 'python',
|
||||
callback = function()
|
||||
require('dap-python').setup()
|
||||
lspconfig.pyright.setup({ capabilities = capabilities })
|
||||
require("conform").setup({
|
||||
python = {"black"},
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
group = 'FileTypeConfigs',
|
||||
pattern = 'go',
|
||||
callback = function()
|
||||
require('dap-python').setup()
|
||||
|
||||
lspconfig.gopls.setup({ capabilities = capabilities })
|
||||
|
||||
require("conform").setup({
|
||||
go = {"gofmt"},
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
group = 'FileTypeConfigs',
|
||||
pattern = 'rust',
|
||||
callback = function()
|
||||
require('dap-python').setup()
|
||||
|
||||
-- lspconfig.pyright.setup({ capabilities = capabilities })
|
||||
|
||||
require("conform").setup({
|
||||
rust = {"rustfmt"},
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
group = 'FileTypeConfigs',
|
||||
pattern = 'markdown',
|
||||
callback = function()
|
||||
lspconfig.marksman.setup({ capabilities = capabilities })
|
||||
require("todo-comments").setup()
|
||||
end,
|
||||
})
|
||||
Reference in New Issue
Block a user