Comments (9)
I tried setting it like this:
(custom-set-variables '(imenu-create-index-function markdown-imenu-create-nested-index)
but it didn't work. any advice here?
It took a while digging around and this seems related to native compilation as far as I can tell. I have a workaround in my config here:
https://codeberg.org/sochotnicky/dotfiles/src/branch/main/dot_doom.d/config.org#headline-64
Basically - disable native compilation for markdown-mode & add a hook to enable nested TOC generation. Might help you as well?
from markdown-toc.
To make a nested TOC, the buffer-local imenu-create-index-function
has to be set to markdown-imenu-create-nested-index
instead of markdown-imenu-create-flat-index
.
from markdown-toc.
I tried setting it like this:
(custom-set-variables '(imenu-create-index-function markdown-imenu-create-nested-index)
but it didn't work. any advice here?
To be clear - you need to delete any already natively-compiled markdown-mode files or that first part won't be effective. Just make sure you do that...
from markdown-toc.
I had to restart my emacs, but it worked! Nice callout @sochotnicky
from markdown-toc.
Did this chance with a new recent Emacs version?
from markdown-toc.
Did this chance with a new recent Emacs version?
It did; maybe a default value was changed? Although this would be a change in markdown-mode rather than Emacs itself right?
from markdown-toc.
I tried setting it like this: (custom-set-variables '(imenu-create-index-function markdown-imenu-create-nested-index)
but it didn't work. any advice here?
from markdown-toc.
Good idea, but didn't work unfortunately. This is a bummer, as this is a super useful feature for me.
from markdown-toc.
Hi, replace this funtion will fix it.
(defun markdown-toc--compute-toc-structure (imenu-index)
"Given a IMENU-INDEX, compute the TOC structure."
(--mapcat (markdown-toc--compute-toc-structure-from-level
(if (eq markdown-toc-user-toc-structure-manipulation-fn 'cdr)
-1
0)
it)
imenu-index))
from markdown-toc.
Related Issues (20)
- Always start TOC on first column HOT 4
- Symbol's function definition is void: markdown-imenu-create-index HOT 3
- Not working on emacs 24.5 HOT 5
- Make `markdown-toc--header-toc-title` customizable HOT 3
- markdown-imenu-create-nested-index function definition is void HOT 4
- Need to insert empty line before TOC header HOT 2
- The comment mentioning how to regenerate the markdown TOC should mention which package the function is from (this one) HOT 4
- Please add a prefix to test-helper.el to avoid conflicts with 68 other packages HOT 2
- Lines starting with # in code sections are treated as headings HOT 1
- strip links from headings HOT 1
- generating toc for a big file requires jumping to the end (markdown-toc-generate-toc: Wrong type argument: consp, 148688) HOT 2
- Proposal: Implement the same API as other toc generators HOT 5
- How to follow the link in TOC? HOT 4
- Generate invalid link when heading contains underscore `_` HOT 3
- 0.1.3 depends on unreleased s.el, and Package-Requires needs to be corrected HOT 4
- update TOC on save HOT 2
- Wrong type argument: consp, nil HOT 6
- Can't load markdown-toc mode or call any functions
- `markdown-toc--to-link` need remove the un-ascii char
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from markdown-toc.