@@ -81,13 +81,6 @@ func SetHighlight(nsID int, name string, val *HLAttrs) {
81
81
name (nvim_set_hl )
82
82
}
83
83
84
- // SetHighlightNameSpace set active namespace for highlights.
85
- //
86
- // nsID is the namespace to activate.
87
- func SetHighlightNameSpace (nsID int ) {
88
- name (nvim__set_hl_ns )
89
- }
90
-
91
84
// FeedKeys input-keys to Nvim, subject to various quirks controlled by "mode"
92
85
// flags. Unlike Input, this is a blocking call.
93
86
//
@@ -990,6 +983,20 @@ func SetBufferText(buffer Buffer, startRow, startCol, endRow, endCol int, replac
990
983
name (nvim_buf_set_text )
991
984
}
992
985
986
+ // BufferText gets a range from the buffer.
987
+ //
988
+ // This differs from BufferLines in that it allows retrieving only
989
+ // portions of a line.
990
+ //
991
+ // Indexing is zero-based. Column indices are end-exclusive.
992
+ //
993
+ // Prefer BufferLines when retrieving entire lines.
994
+ //
995
+ // opts is optional parameters. Currently unused.
996
+ func BufferText (buffer Buffer , startRow , startCol , endRow , endCol int , opts map [string ]interface {}) [][]byte {
997
+ name (nvim_buf_get_text )
998
+ }
999
+
993
1000
// BufferOffset returns the byte offset of a line (0-indexed).
994
1001
//
995
1002
// Line 1 (index=0) has offset 0. UTF-8 bytes are counted. EOL is one byte.
@@ -1502,6 +1509,58 @@ func IsTabpageValid(tabpage Tabpage) (valid bool) {
1502
1509
name (nvim_tabpage_is_valid )
1503
1510
}
1504
1511
1512
+ // autocmd.c
1513
+
1514
+ // Autocmds get all autocommands that match the corresponding {opts}.
1515
+ //
1516
+ // Note that when multiple patterns or events are provided, it will find all the autocommands that
1517
+ // match any combination of them.
1518
+ func Autocmds (opts map [string ]interface {}) (result []* AutocmdType ) {
1519
+ name (nvim_get_autocmds )
1520
+ }
1521
+
1522
+ // CreateAutocmd create an autocommand.
1523
+ //
1524
+ // The API allows for two (mutually exclusive) types of actions to be executed when the autocommand
1525
+ // triggers: a callback function (Lua or Vimscript), or a command (like regular autocommands).
1526
+ func CreateAutocmd (event interface {}, opts map [string ]interface {}) (id int ) {
1527
+ name (nvim_create_autocmd )
1528
+ }
1529
+
1530
+ // DeleteAutocmd delete an autocommand by id.
1531
+ //
1532
+ // NOTE: Only autocommands created via the API have an id.
1533
+ func DeleteAutocmd (id int ) {
1534
+ name (nvim_del_autocmd )
1535
+ }
1536
+
1537
+ // ClearAutocmds clear all autocommands that match the corresponding {opts}.
1538
+ //
1539
+ // To delete a particular autocmd, see DeleteAutocmd.
1540
+ func ClearAutocmds (opts map [string ]interface {}) {
1541
+ name (nvim_clear_autocmds )
1542
+ }
1543
+
1544
+ // CreateAugroup create or get an autocommand group(autocmd-groups).
1545
+ func CreateAugroup (name string , opts map [string ]interface {}) (id int ) {
1546
+ name (nvim_create_augroup )
1547
+ }
1548
+
1549
+ // DeleteAugroupByID delete an autocommand group by id.
1550
+ func DeleteAugroupByID (id int ) {
1551
+ name (nvim_del_augroup_by_id )
1552
+ }
1553
+
1554
+ // DeleteAugroupByID delete an autocommand group by name.
1555
+ func DeleteAugroupByName (name string ) {
1556
+ name (nvim_del_augroup_by_name )
1557
+ }
1558
+
1559
+ // ExecAutocmds execute all autocommands for {event} that match the corresponding {opts} autocmd-execute.
1560
+ func ExecAutocmds (event interface {}, opts map [string ]interface {}) {
1561
+ name (nvim_exec_autocmds )
1562
+ }
1563
+
1505
1564
// ui.c
1506
1565
1507
1566
// AttachUI registers the client as a remote UI. After this method is called,
0 commit comments