Skip to content

Commit

Permalink
Back to markdown treesitter!
Browse files Browse the repository at this point in the history
The bug tree-sitter-grammars/tree-sitter-markdown#114 was
finally fixed, merged and a release cut. But nix is being slow to update
grammars as usual. So we're overlaying the new release now. W00t!

Also updating this go:

ruff: 0.1.4 → 0.1.5, +61.9 KiB
vscode-langservers-custom: 4.7.0 → 4.8.0, +1305.9 KiB
  • Loading branch information
zmre committed Nov 13, 2023
1 parent 4215d49 commit 786d1b1
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 27 deletions.
56 changes: 37 additions & 19 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 16 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@
# clipboard-image.url = "github:ekickx/clipboard-image.nvim";
clipboard-image.url = "github:postfen/clipboard-image.nvim";
clipboard-image.flake = false;
vscode-langservers-custom.url = "github:hrsh7th/vscode-langservers-extracted/v4.7.0";
vscode-langservers-custom.url = "github:hrsh7th/vscode-langservers-extracted/v4.8.0";
vscode-langservers-custom.flake = false;
conform-nvim.url = "github:stevearc/conform.nvim";
conform-nvim.flake = false;
tree-sitter-markdown.url = "github:MDeiml/tree-sitter-markdown/v0.1.7";
tree-sitter-markdown.flake = false;
};
outputs = inputs @ {
self,
Expand All @@ -37,6 +39,17 @@
inherit system;
config = {allowUnfree = true;};
overlays = [
(self: super: {
nvim-treesitter.allGrammars = super.nvim-treesitter.allGrammars.overrideAttrs (oldAttrs: {
tree-sitter-markdown = inputs.tree-sitter-markdown // {location = "tree-sitter-markdown";};
tree-sitter-markdown-inline =
inputs.tree-sitter-markdown
// {
language = "markdown_inline";
location = "tree-sitter-markdown-inline";
};
});
})
(self: super: {
vimPlugins =
super.vimPlugins
Expand All @@ -63,9 +76,9 @@
# we have this custom because they don't have the eslint server and they hard code
# some vscodium paths that we don't care about
pname = "vscode-langservers-custom";
version = "4.7.0";
version = "4.8.0";
src = inputs.vscode-langservers-custom;
npmDepsHash = "sha256-DhajWr+O0zgJALr7I/Nc5GmkOsa9QXfAQpZCaULV47M=";
npmDepsHash = "sha256-LFWC87Ahvjf2moijayFze1Jk0TmTc7rOUd/s489PHro=";

buildPhase = let
extensions =
Expand Down
4 changes: 4 additions & 0 deletions pwnvim/plugins/nvim-tree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ require("oil").setup({
-- Oil will take over directory buffers (e.g. `vim .` or `:e src/`)
-- Set to false if you still want to use netrw.
default_file_explorer = true,
skip_confirm_for_simple_edits = true,
keymaps = {
["q"] = "actions.close"
}
})

--[[ require 'nvim-tree'.setup {
Expand Down
10 changes: 5 additions & 5 deletions pwnvim/plugins/treesitter.lua
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
require("nvim-treesitter.configs").setup({
sync_install = false,
modules = {},
disable = { "markdown" }, -- until https://github.com/MDeiml/tree-sitter-markdown/issues/114
-- disable = { "markdown" }, -- until https://github.com/MDeiml/tree-sitter-markdown/issues/114
ensure_installed = {},
ignore_install = { "all" },
auto_install = false,
autotag = { enable = true },
highlight = {
enable = true,
disable = { "markdown" }, -- until https://github.com/MDeiml/tree-sitter-markdown/issues/114
-- disable = { "markdown" }, -- until https://github.com/MDeiml/tree-sitter-markdown/issues/114

additional_vim_regex_highlighting = false
},
indent = { enable = true, disable = { "yaml", "markdown", "dbout" } },
incremental_selection = {
enable = true,
disable = { "markdown" }, -- until https://github.com/MDeiml/tree-sitter-markdown/issues/114
-- disable = { "markdown" }, -- until https://github.com/MDeiml/tree-sitter-markdown/issues/114
is_supported = function()
-- disable in command window
local mode = vim.api.nvim_get_mode().mode
Expand All @@ -24,15 +24,15 @@ require("nvim-treesitter.configs").setup({
},
context_commentstring = {
enable = true,
disable = { "markdown", "dbout" }, -- until https://github.com/MDeiml/tree-sitter-markdown/issues/114
-- disable = { "markdown", "dbout" }, -- until https://github.com/MDeiml/tree-sitter-markdown/issues/114
},
matchup = {
enable = true,
disable = { "dbout" },
include_match_words = true
},
textobjects = {
disable = { "markdown" }, -- until https://github.com/MDeiml/tree-sitter-markdown/issues/114
disable = {},
select = {
enable = true,
lookahead = true,
Expand Down

0 comments on commit 786d1b1

Please sign in to comment.