Skip to content

Commit

Permalink
feat(nvim): add mdx lsp and highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
radoslawgrochowski committed Oct 9, 2024
1 parent a253853 commit e02af1c
Show file tree
Hide file tree
Showing 7 changed files with 2,212 additions and 185 deletions.
9 changes: 8 additions & 1 deletion modules/nvim/plugins/lsp/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ lspconfig.jsonls.setup {
},
}
lspconfig.yamlls.setup {
capabilities = capabilities,
settings = {
yaml = {
schemaStore = {
Expand All @@ -207,6 +208,12 @@ lspconfig.yamlls.setup {
},
},
}
lspconfig.bashls.setup {}
lspconfig.bashls.setup {
capabilities = capabilities,
}
lspconfig.mdx_analyzer.setup {
capabilities = capabilities,
root_dir = require('lspconfig.util').root_pattern('.git', 'package.json'),
}

require('fidget').setup {}
1 change: 1 addition & 0 deletions modules/nvim/plugins/lsp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
efm-langserver
localNodePackages."@vtsls/language-server"
localNodePackages.vscode-langservers-extracted
localNodePackages."@mdx-js/language-server"
ltex-ls
lua-language-server
nil
Expand Down
4 changes: 3 additions & 1 deletion modules/nvim/plugins/theme/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ local wk = require 'which-key'

vim.cmd.colorscheme 'tokyonight-night'

require('render-markdown').setup {}
require('render-markdown').setup {
file_types = { 'markdown', 'markdown.mdx' },
}
3 changes: 3 additions & 0 deletions modules/nvim/plugins/treesitter/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ require('treesitter-context').setup {
}

require('nvim-ts-autotag').setup {}

vim.filetype.add { extension = { mdx = 'markdown.mdx' } }
vim.treesitter.language.register('markdown', 'markdown.mdx')
Loading

0 comments on commit e02af1c

Please sign in to comment.