                                                           face
                                                           hima-simple-gray)
                                             ""))
-                    '(:eval (mode-line-idle 0.3
-                                            '(:propertize (:eval (let ((thing-name (meain/tree-sitter-config-nesting)))
-                                                                   (if (and thing-name (> (length thing-name) 0))
-                                                                       (format ":%s" thing-name))))
-                                                          face
-                                                          hima-simple-gray)
-                                            ""))
                     '(:eval (mode-line-idle 1.0
                                             '(:propertize (:eval (if (and (project-current)
                                                                           (not (file-remote-p default-directory)))

      (pulse-momentary-highlight-region (car (tsc-node-byte-range (button-get button 'points-to)))
                                        (cdr (tsc-node-byte-range (button-get button 'points-to)))
                                        'company-template-field)))
  (defun meain/tree-sitter-config-nesting ()
    (if (or (eq major-mode 'json-mode) (eq major-mode 'yaml-mode) (eq major-mode 'nix-mode))
        (let* ((cur-point (point))
               (query (pcase major-mode
                        ('json-mode "(object (pair (string (string_content) @key) (_)) @item)")
                        ('yaml-mode "(block_mapping_pair (flow_node) @key (_)) @item")
                        ('nix-mode "(bind (attrpath (attr_identifier) @key)) @item")))
               (root-node (tsc-root-node tree-sitter-tree))
               (query (tsc-make-query tree-sitter-language query))
               (matches (tsc-query-matches query root-node #'tsc--buffer-substring-no-properties)))
          (string-join (remove-if (lambda (x) (eq x nil))
                                  (seq-map (lambda (x)
                                             (let (
                                                   (item (seq-elt (cdr x) 0))
                                                   (key (seq-elt (cdr x) 1)))
                                               (if (and
                                                    (> cur-point (byte-to-position (car (tsc-node-byte-range (cdr item)))))
                                                    (< cur-point (byte-to-position (cdr (tsc-node-byte-range (cdr item))))))
                                                   (format "%s" (tsc-node-text (cdr key)))
                                                 nil)))
                                           matches))
                       "."))))
  (defun meain/get-config-nesting-paths ()
    "Get out all the nested paths in a config file."
    (let* ((query (pcase major-mode

    (load-theme current-theme t)))

;; Better modeline
(use-package which-func
  :commands (which-function))
(use-package mode-line-idle
  :straight t
  :commands (mode-line-idle))
