Skip to content

Commit

Permalink
WIP: Remove some warnings, require verilog-ts-mode as depedency
Browse files Browse the repository at this point in the history
  • Loading branch information
gmlarumbe committed Aug 21, 2023
1 parent cca6b17 commit a52da15
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 18 deletions.
1 change: 0 additions & 1 deletion misc/notes.org
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,6 @@ DANGER: Still very inefficient, removed funcall in

* Tree-sitter dev
** Pending
*** TODO Check capf
*** TODO Check TODOs in the whole project
*** TODO Check verilog-ts-mode
*** TODO Grab the hashes files thing from laptop
Expand Down
2 changes: 1 addition & 1 deletion verilog-ext-hierarchy.el
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
(require 'tree-widget)
(require 'async)
(require 'verilog-ext-nav)
;; (require 'verilog-ts-mode) ; TODO: Makes tests fail, probably because of auto-mode-alist?
(require 'verilog-ts-mode)

(defgroup verilog-ext-hierarchy nil
"Verilog-ext hierarchy."
Expand Down
4 changes: 2 additions & 2 deletions verilog-ext-tags.el
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
;;; Code:

(require 'verilog-ext-nav)
;; (require 'verilog-ts-mode) ; TODO: Makes tests fail, probably because of auto-mode-alist?
(require 'verilog-ts-mode)

(defgroup verilog-ext-tags nil
"Verilog-ext tags."
Expand Down Expand Up @@ -290,7 +290,7 @@ Need to be quoted as symbols to avoid bugs: E.g:
\"variable_decl_assignment\".
Even though \"data_declaration\" would match all declarations it cannot be
reliably used since it is too generic. For example, it would not allow parsing
reliably used since it is too generic. For example, it would not allow parsing
of multiple variables declarations in one-line.
Even though \"module_instantiation\" and \"interface_instantiation\" are not
Expand Down
28 changes: 15 additions & 13 deletions verilog-ext-workspace.el
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,20 @@ If set to nil default to search for current project files."
:type 'string)


(defvar verilog-ext-workspace-tags-defs-table (make-hash-table :test #'equal))
(defvar verilog-ext-workspace-tags-refs-table (make-hash-table :test #'equal))
(defvar verilog-ext-workspace-tags-inst-table (make-hash-table :test #'equal))

(defconst verilog-ext-workspace-cache-dir (file-name-concat user-emacs-directory "verilog-ext")
"The directory where Verilog-ext cache files will be placed at.")

(defvar verilog-ext-workspace-cache-typedefs nil)
(defvar verilog-ext-workspace-cache-tags-defs nil)
(defvar verilog-ext-workspace-cache-tags-refs nil)
(defvar verilog-ext-workspace-cache-tags-inst nil)
(defvar verilog-ext-workspace-cache-hierarchy nil)


(defun verilog-ext-workspace-root ()
"Return directory of current workspace root."
(or verilog-ext-workspace-root-dir
Expand All @@ -98,15 +112,6 @@ Follow symlinks if optional argument FOLLOW-SYMLINKS is non-nil."


;;;; Cache
(defconst verilog-ext-workspace-cache-dir (file-name-concat user-emacs-directory "verilog-ext")
"The directory where Verilog-ext cache files will be placed at.")

(defvar verilog-ext-workspace-cache-typedefs nil)
(defvar verilog-ext-workspace-cache-tags-defs nil)
(defvar verilog-ext-workspace-cache-tags-refs nil)
(defvar verilog-ext-workspace-cache-tags-inst nil)
(defvar verilog-ext-workspace-cache-hierarchy nil)

(defun verilog-ext-workspace-serialize (data filename)
"Serialize DATA to FILENAME.
Expand Down Expand Up @@ -255,9 +260,6 @@ With current-prefix or VERBOSE, dump output log."


;;;; Tags
(defvar verilog-ext-workspace-tags-defs-table (make-hash-table :test #'equal))
(defvar verilog-ext-workspace-tags-refs-table (make-hash-table :test #'equal))
(defvar verilog-ext-workspace-tags-inst-table (make-hash-table :test #'equal))
(defvar verilog-ext-workspace-tags-current-file nil)

(defun verilog-ext-workspace-get-tags (&optional verbose)
Expand Down Expand Up @@ -503,7 +505,7 @@ The function will detect any of the supported compilation error parsers
and will set the appropriate mode."
(interactive)
(unless verilog-ext-workspace-compile-cmd
(error "You first need to set `verilog-ext-workspace-compile-cmd'."))
(error "You first need to set `verilog-ext-workspace-compile-cmd'"))
(let* ((cmd-list (split-string verilog-ext-workspace-compile-cmd))
(cmd-args (cdr cmd-list))
(cmd-bin (car cmd-list))
Expand Down
2 changes: 1 addition & 1 deletion verilog-ext.el
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
;; URL: https://github.com/gmlarumbe/verilog-ext
;; Version: 0.2.0
;; Keywords: Verilog, IDE, Tools
;; Package-Requires: ((emacs "28.1") (verilog-mode "2023.6.6.141322628") (eglot "1.9") (lsp-mode "8.0.1") (ag "0.48") (ripgrep "0.4.0") (hydra "0.15.0") (apheleia "3.1") (yasnippet "0.14.0") (company "0.9.13") (flycheck "33-cvs") (outshine "3.1-pre") (async "1.9.7"))
;; Package-Requires: ((emacs "28.1") (verilog-mode "2023.6.6.141322628") (verilog-ts-mode "0.0.0") (eglot "1.9") (lsp-mode "8.0.1") (ag "0.48") (ripgrep "0.4.0") (hydra "0.15.0") (apheleia "3.1") (yasnippet "0.14.0") (company "0.9.13") (flycheck "33-cvs") (outshine "3.1-pre") (async "1.9.7"))

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
Expand Down

0 comments on commit a52da15

Please sign in to comment.