neovim configuration using rocks.nvim plugin manager
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(plugins): rest.nvim dev setup

+35 -1
+9
lua/core/ui/statusline.lua
··· 14 14 return path .. name 15 15 end 16 16 17 + local function rest() 18 + local env_file = vim.b._rest_nvim_env_file 19 + if not env_file then 20 + return "" 21 + end 22 + return "(" .. env_file .. ") " 23 + end 24 + 17 25 ---Show attached LSP clients in `[name1, name2]` format. 18 26 ---Long server names will be modified. For example, `lua-language-server` will be shorten to `lua-ls` 19 27 ---Returns an empty string if there aren't any attached LSP clients. ··· 50 58 filename(), 51 59 "%h%w%m%r", 52 60 "%=", 61 + rest(), 53 62 "%y", 54 63 tab_size(), 55 64 lsp_status(),
+26 -1
lua/plugins/rest.lua
··· 1 - require("rest-nvim").setup() 1 + ---@module 'rest-nvim' 2 + 3 + vim.opt.rtp:prepend(vim.fs.normalize("$HOME/repo/rest.nvim")) 4 + local parser_dir = "$HOME/.cache/tree-sitter/lib/http.so" 5 + if vim.fn.has("macunix") == 1 then 6 + parser_dir = "$HOME/Library/Caches/tree-sitter/lib/http.so" 7 + end 8 + vim.treesitter.language.add("http", { path = vim.fs.normalize(parser_dir) }) 9 + if not vim.treesitter.language.get_lang("http") then 10 + vim.treesitter.language.register("http", "http") 11 + end 12 + 13 + ---@type rest.Opts 14 + vim.g.rest_nvim = { 15 + highlight = { 16 + timeout = 250, 17 + }, 18 + _log_level = vim.log.levels.DEBUG, 19 + } 20 + 21 + vim.api.nvim_create_autocmd("FileType", { 22 + pattern = "http", 23 + callback = function (ev) 24 + vim.treesitter.start(ev.buf, "http") 25 + end 26 + })