diff options
| -rwxr-xr-x[-rw-r--r--] | reset-ssh-connections.sh | 0 | ||||
| -rwxr-xr-x[-rw-r--r--] | setup.sh | 21 |
2 files changed, 21 insertions, 0 deletions
diff --git a/reset-ssh-connections.sh b/reset-ssh-connections.sh index f19300d..f19300d 100644..100755 --- a/reset-ssh-connections.sh +++ b/reset-ssh-connections.sh | |||
| @@ -63,7 +63,28 @@ vim.api.nvim_create_autocmd("BufWritePost", { | |||
| 63 | }) | 63 | }) |
| 64 | EOF | 64 | EOF |
| 65 | 65 | ||
| 66 | -- Fix for vim.tbl_add_reverse_lookup deprecation | ||
| 67 | -- Replace any usage of vim.tbl_add_reverse_lookup with: | ||
| 68 | local function add_reverse_lookup(tbl) | ||
| 69 | local result = {} | ||
| 70 | for k, v in pairs(tbl) do | ||
| 71 | result[k] = v | ||
| 72 | result[v] = k | ||
| 73 | end | ||
| 74 | return result | ||
| 75 | end | ||
| 66 | 76 | ||
| 77 | -- Fix for vim.treesitter.get_parser warning | ||
| 78 | -- Wrap any usage of vim.treesitter.get_parser with a pcall: | ||
| 79 | local function safe_get_parser(bufnr, lang) | ||
| 80 | local ok, parser = pcall(vim.treesitter.get_parser, bufnr, lang) | ||
| 81 | if ok then | ||
| 82 | return parser | ||
| 83 | else | ||
| 84 | -- Handle the error or return nil | ||
| 85 | return nil | ||
| 86 | end | ||
| 87 | end | ||
| 67 | 88 | ||
| 68 | 89 | ||
| 69 | # add check fro each component | 90 | # add check fro each component |
