-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplayground.lua
More file actions
61 lines (51 loc) · 1.62 KB
/
Copy pathplayground.lua
File metadata and controls
61 lines (51 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
-- vim.api.nvim_echo({{ "before treesitter stopped", "TSConstant" }}, true, {})
-- local function get_buf_size_in_bytes(buf)
-- local line_count = vim.api.nvim_buf_line_count(buf)
-- return vim.api.nvim_buf_get_offset(buf, line_count)
-- end
-- print(get_buf_size_in_bytes(vim.api.nvim_get_current_buf()))
-- vim.ui.select({ "tabs", "spaces" }, {
-- prompt = "Select tabs or spaces:",
-- format_item = function(item) return "I'd like to choose " .. item end,
-- }, function(choice)
-- if choice == "spaces" then
-- vim.o.expandtab = true
-- else
-- vim.o.expandtab = false
-- end
-- end)
-- local null_ls = require("null-ls")
-- table.insert(null_ls.builtins.formatting.prettierd.filetypes, "astro")
-- vim.pretty_print(null_ls.builtins.formatting.prettierd.filetypes)
-- NeoTreeVertSplit = { fg = c.bg1, bg = cfg.transparent and c.none or c.bg1 },
-- NvimTreeVertSplit
-- VertSplit = {fg = c.bg3},
---
--- LSP rust-analyzer runnables
---
-- local buf = 13
-- local function get_params(buf_number)
-- return {
-- textDocument = vim.lsp.util.make_text_document_params(buf_number),
-- position = nil, -- get em all
-- }
-- end
-- local function get_options(result)
-- local option_strings = {}
--
-- for _, runnable in ipairs(result) do
-- local str = runnable.label
-- table.insert(option_strings, str)
-- end
--
-- return option_strings
-- end
-- local function handler(_, result)
-- -- :h lsp-handler
-- local options = get_options(result)
-- vim.pretty_print(options)
-- end
-- vim.lsp.buf_request(buf, "experimental/runnables", get_params(buf), handler)
---
--- LSP rust-analyzer runnables
---