docstr icon indicating copy to clipboard operation
docstr copied to clipboard

How to customize a swift-style to replace the C-style?

Open iT-Boyer opened this issue 2 years ago • 0 comments

(docstr--c-style-search-string 1)

(defun docstr-trigger-swift (&rest _)
  "Trigger document string inside Swift."
  (when (and (memq major-mode docstr-swift-modes)
             (docstr--doc-valid-p)
             (docstr-util-looking-back "///" 3))
    (insert " ")
    (docstr--insert-doc-string (docstr--c-style-search-string 1))))
 /// [summary]
    /// 
    /// - arr1: [description]
    /// - arr2: [description]
    /// - returns: [description]  

The default swift language annotation is the C language style. How to customize a swift style to replace the C language style?

this swift style like:

/// <#Description#>
    /// - Parameters:
    ///   - arr1: <#arr1 description#>
    ///   - arr2: <#arr2 description#>
    /// - Returns: <#description#>

iT-Boyer avatar Dec 15 '21 10:12 iT-Boyer