irongit

feat(nvim): kalala, rest.nvim

huncholanehuncholaneauthored
parent fd35febcommit d52302e9ec9ff64bf649cb891d2e7ccb64f361d5Browse files

6 files changed, +94 -3

+2-1nvim/lazy-lock.json
@@ -17,5 +17,6 @@
1717 "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
1818 "tokyonight.nvim": { "branch": "main", "commit": "ca56e536f565293b83a075971fb5880cfe41d6de" },
1919 "tree-sitter-html": { "branch": "master", "commit": "73a3947324f6efddf9e17c0ea58d454843590cc0" },
20- "which-key.nvim": { "branch": "main", "commit": "904308e6885bbb7b60714c80ab3daf0c071c1492" }
20+ "which-key.nvim": { "branch": "main", "commit": "904308e6885bbb7b60714c80ab3daf0c071c1492" },
21+ "yazi.nvim": { "branch": "main", "commit": "3f81faf0cf838acb312f0f0d75ac1a8ac69166ed" }
2122 }
+36-0nvim/lsp/html.lua
@@ -0,0 +1,36 @@
1+---@brief
2+---
3+--- https://github.com/hrsh7th/vscode-langservers-extracted
4+---
5+--- `vscode-html-language-server` can be installed via `npm`:
6+--- ```sh
7+--- npm i -g vscode-langservers-extracted
8+--- ```
9+---
10+--- Neovim does not currently include built-in snippets. `vscode-html-language-server` only provides completions when snippet support is enabled.
11+--- To enable completion, install a snippet plugin and add the following override to your language client capabilities during setup.
12+---
13+--- The code-formatting feature of the lsp can be controlled with the `provideFormatter` option.
14+---
15+--- ```lua
16+--- --Enable (broadcasting) snippet capability for completion
17+--- local capabilities = vim.lsp.protocol.make_client_capabilities()
18+--- capabilities.textDocument.completion.completionItem.snippetSupport = true
19+---
20+--- vim.lsp.config('html', {
21+--- capabilities = capabilities,
22+--- })
23+--- ```
24+
25+---@type vim.lsp.Config
26+return {
27+ cmd = { 'vscode-html-language-server', '--stdio' },
28+ filetypes = { 'html', 'templ' },
29+ root_markers = { 'package.json', '.git' },
30+ settings = {},
31+ init_options = {
32+ provideFormatter = true,
33+ embeddedLanguages = { css = true, javascript = true },
34+ configurationSection = { 'html', 'css', 'javascript' },
35+ },
36+}
+12-0nvim/lsp/kalala_ls.lua
@@ -0,0 +1,12 @@
1+---@brief
2+---
3+--- https://github.com/mistweaverco/kulala-ls
4+---
5+--- A minimal language server for HTTP syntax.
6+
7+---@type vim.lsp.Config
8+return {
9+ cmd = { 'kulala-ls', '--stdio' },
10+ filetypes = { 'http' },
11+ root_markers = { '.git' },
12+}
+0-1nvim/lua/keymaps.lua
@@ -4,7 +4,6 @@ end
44 --leader
55 easymap("n", "<leader>k", ":SafeBD<cr>", "Close Buffer")
66 easymap("n", "<leader>b", ":LastFile<cr>", "Last File")
7-easymap("n", "<leader>e", ":Ex<cr>", "Explore")
87 easymap("n", "<leader>q", ":silent! wa! | silent! qa!<cr>", "Quit")
98 easymap("n", "<leader>;", "q:", "Elite Cmd")
109 easymap("n", "<leader>f", ":Format<cr>", "Format")
+1-1nvim/lua/options.lua
@@ -27,5 +27,5 @@ set ignorecase
2727 set smartcase
2828 set foldlevel=99
2929 set statusline=[%{getcwd()}]\ %f:%{nvim_treesitter#statusline(1000)}
30-set tabline=%!NumberedTabPages()
30+"set tabline=%!NumberedTabPages()
3131 ]])
+43-0nvim/lua/plugins.lua
@@ -28,6 +28,49 @@ require("lazy").setup({
2828 })
2929 end,
3030 },
31+ {
32+ "mikavilpas/yazi.nvim",
33+ version = "*", -- use the latest stable version
34+ event = "VeryLazy",
35+ dependencies = {
36+ { "nvim-lua/plenary.nvim", lazy = true },
37+ },
38+ keys = {
39+ -- 👇 in this section, choose your own keymappings!
40+ {
41+ "<leader>-",
42+ mode = { "n", "v" },
43+ "<cmd>Yazi<cr>",
44+ desc = "Open yazi at the current file",
45+ },
46+ {
47+ -- Open in the current working directory
48+ "<leader>e",
49+ "<cmd>Yazi cwd<cr>",
50+ desc = "Open the file manager in nvim's working directory",
51+ },
52+ {
53+ "<c-up>",
54+ "<cmd>Yazi toggle<cr>",
55+ desc = "Resume the last yazi session",
56+ },
57+ },
58+ ---@type YaziConfig | {}
59+ opts = {
60+ -- if you want to open yazi instead of netrw, see below for more info
61+ open_for_directories = false,
62+ keymaps = {
63+ show_help = "<f1>",
64+ },
65+ },
66+ -- 👇 if you use `open_for_directories=true`, this is recommended
67+ init = function()
68+ -- mark netrw as loaded so it's not loaded at all.
69+ --
70+ -- More details: https://github.com/mikavilpas/yazi.nvim/issues/802
71+ vim.g.loaded_netrwPlugin = 1
72+ end,
73+ },
3174 {
3275 "rest-nvim/rest.nvim",
3376 dependencies = {