mirror of
https://github.com/stevenproctor/dotfiles.git
synced 2026-11-22 14:48:25 -06:00
nvim: update lsp and treesitter configs
This commit is contained in:
1 parent
f2dbbdf779
commit
c328151670
6 files changed
+207
-146
No files matched your search
@@ -5,27 +5,29 @@
|
||||
:additional_vim_regex_highlighting [:org]}
|
||||
:ensure_installed :all
|
||||
; [:org]
|
||||
:rainbow {:enable true
|
||||
:extended_mode true
|
||||
; Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
|
||||
:max_file_lines 10000
|
||||
; Do not enable for files with more than 1000 lines, int
|
||||
:colors ["#dc322f"
|
||||
; red
|
||||
"#b58900"
|
||||
; yellow
|
||||
"#d33682"
|
||||
; magenta
|
||||
"#859900"
|
||||
; green
|
||||
"#2aa198"
|
||||
; cyan
|
||||
"#268bd2"
|
||||
; blue
|
||||
"#6c71c4"
|
||||
; violet / brmagenta
|
||||
]
|
||||
; table of hex strings
|
||||
}})
|
||||
; :rainbow {:enable true
|
||||
; :extended_mode true
|
||||
; ; Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
|
||||
; :max_file_lines 10000
|
||||
; ; Do not enable for files with more than 1000 lines, int
|
||||
; :colors ["#dc322f"
|
||||
; ; red
|
||||
; "#b58900"
|
||||
; ; yellow
|
||||
; "#d33682"
|
||||
; ; magenta
|
||||
; "#859900"
|
||||
; ; green
|
||||
; "#2aa198"
|
||||
; ; cyan
|
||||
; "#268bd2"
|
||||
; ; blue
|
||||
; "#6c71c4"
|
||||
; ; violet / brmagenta
|
||||
; ]
|
||||
; ; table of hex strings
|
||||
; }
|
||||
|
||||
})
|
||||
|
||||
; lua print(require('nvim-treesitter.parsers').get_parser():language_for_range({ require('nvim-treesitter.ts_utils').get_node_at_cursor():range() }):lang())
|
||||
@@ -79,14 +79,14 @@
|
||||
:yamlls
|
||||
:marksman
|
||||
:html
|
||||
:basedpyright
|
||||
:ts_ls
|
||||
; :basedpyright
|
||||
; :ts_ls
|
||||
:terraformls
|
||||
; "tailwindcss"
|
||||
:dockerls
|
||||
:docker_compose_language_service
|
||||
:bashls
|
||||
:taplo
|
||||
; :taplo
|
||||
:sqlls])
|
||||
|
||||
(local filetype->formatters
|
||||
@@ -95,7 +95,7 @@
|
||||
:python [:ruff_organize_imports :ruff_format]
|
||||
:rust [:rustfmt]
|
||||
:toml [:taplo]
|
||||
:clojure [:cljfmt]
|
||||
; :clojure [:cljfmt]
|
||||
:json [:prettierd]
|
||||
:javascript [:prettierd]
|
||||
:typescript [:prettierd]
|
||||
@@ -107,6 +107,7 @@
|
||||
:fennel [:fnlfmt]
|
||||
:sql [:sqlfmt]
|
||||
:gleam [:gleam]
|
||||
:_ {:lsp_format :prefer}
|
||||
:* [:trim_whitespace :trim_newlines]})
|
||||
|
||||
(local formatter->package {:ruff_organize_imports :ruff :ruff_format :ruff})
|
||||
@@ -128,57 +129,57 @@
|
||||
|
||||
[(tx :folke/lsp-colors.nvim {})
|
||||
(tx :williamboman/mason.nvim {:tag :v1.11.0 :opts {}})
|
||||
; (tx :stevearc/conform.nvim
|
||||
; {:dependencies [:rcarriga/nvim-notify]
|
||||
; :opts {:default_format_opts {:lsp_format :fallback}
|
||||
; :formatters_by_ft filetype->formatters
|
||||
; :format_on_save (fn [_buf]
|
||||
; (when (and vim.g.dotfiles_format_on_save
|
||||
; (or (= nil
|
||||
; vim.b.dotfiles_format_on_save)
|
||||
; vim.b.dotfiles_format_on_save)
|
||||
; (not (. disable-formatter-on-save
|
||||
; vim.bo.filetype)))
|
||||
; {:timeout_ms 500 :lsp_format :fallback}))}
|
||||
; :config (fn [_ opts]
|
||||
; (let [conform (require :conform)
|
||||
; registry (require :mason-registry)
|
||||
; formatters-for-mason {}]
|
||||
; (set conform.formatters.shfmt {:prepend_args [:-i :2 :-ci]})
|
||||
; (vim.schedule (fn []
|
||||
; (each [_ft formatters (pairs filetype->formatters)]
|
||||
; (each [_idx formatter (ipairs formatters)]
|
||||
; (when (not (. disable-formatter-auto-install
|
||||
; formatter))
|
||||
; (tset formatters-for-mason
|
||||
; (or (. formatter->package
|
||||
; formatter)
|
||||
; formatter)
|
||||
; true))))
|
||||
; (each [formatter _true (pairs formatters-for-mason)]
|
||||
; (let [pkg (registry.get_package formatter)]
|
||||
; (when (not (pkg:is_installed))
|
||||
; (vim.notify (.. "Automatically installing "
|
||||
; formatter " with Mason."))
|
||||
; (pkg:install))))))
|
||||
; (set vim.g.dotfiles_format_on_save true)
|
||||
; (conform.setup opts)
|
||||
; (set vim.o.formatexpr "v:lua.require'conform'.formatexpr()")))
|
||||
; :keys [(tx :<leader>tf
|
||||
; (fn []
|
||||
; (set vim.b.dotfiles_format_on_save
|
||||
; (if (= nil vim.b.dotfiles_format_on_save) false
|
||||
; (not vim.b.dotfiles_format_on_save)))
|
||||
; (vim.notify (.. "Set vim.b.dotfiles_format_on_save to "
|
||||
; (tostring vim.b.dotfiles_format_on_save))))
|
||||
; {:desc "Toggle buffer formatting"})
|
||||
; (tx :<leader>tF
|
||||
; (fn []
|
||||
; (set vim.g.dotfiles_format_on_save
|
||||
; (not vim.g.dotfiles_format_on_save))
|
||||
; (vim.notify (.. "Set vim.g.dotfiles_format_on_save to "
|
||||
; (tostring vim.g.dotfiles_format_on_save))))
|
||||
; {:desc "Toggle global formatting"})]})
|
||||
(tx :stevearc/conform.nvim
|
||||
{:dependencies [:rcarriga/nvim-notify]
|
||||
:opts {;;:default_format_opts {:lsp_format :fallback}
|
||||
:formatters_by_ft filetype->formatters
|
||||
:format_on_save (fn [_buf]
|
||||
(when (and vim.g.dotfiles_format_on_save
|
||||
(or (= nil
|
||||
vim.b.dotfiles_format_on_save)
|
||||
vim.b.dotfiles_format_on_save)
|
||||
(not (. disable-formatter-on-save
|
||||
vim.bo.filetype)))
|
||||
{:timeout_ms 500 :lsp_format :fallback}))}
|
||||
:config (fn [_ opts]
|
||||
(let [conform (require :conform)
|
||||
registry (require :mason-registry)
|
||||
formatters-for-mason {}]
|
||||
(set conform.formatters.shfmt {:prepend_args [:-i :2 :-ci]})
|
||||
(vim.schedule (fn []
|
||||
(each [_ft formatters (pairs filetype->formatters)]
|
||||
(each [_idx formatter (ipairs formatters)]
|
||||
(when (not (. disable-formatter-auto-install
|
||||
formatter))
|
||||
(tset formatters-for-mason
|
||||
(or (. formatter->package
|
||||
formatter)
|
||||
formatter)
|
||||
true))))
|
||||
(each [formatter _true (pairs formatters-for-mason)]
|
||||
(let [pkg (registry.get_package formatter)]
|
||||
(when (not (pkg:is_installed))
|
||||
(vim.notify (.. "Automatically installing "
|
||||
formatter " with Mason."))
|
||||
(pkg:install))))))
|
||||
(set vim.g.dotfiles_format_on_save true)
|
||||
(conform.setup opts)
|
||||
(set vim.o.formatexpr "v:lua.require'conform'.formatexpr()")))
|
||||
:keys [(tx :<leader>tbf
|
||||
(fn []
|
||||
(set vim.b.dotfiles_format_on_save
|
||||
(if (= nil vim.b.dotfiles_format_on_save) false
|
||||
(not vim.b.dotfiles_format_on_save)))
|
||||
(vim.notify (.. "Set vim.b.dotfiles_format_on_save to "
|
||||
(tostring vim.b.dotfiles_format_on_save))))
|
||||
{:desc "Toggle buffer formatting"})
|
||||
(tx :<leader>tgf
|
||||
(fn []
|
||||
(set vim.g.dotfiles_format_on_save
|
||||
(not vim.g.dotfiles_format_on_save))
|
||||
(vim.notify (.. "Set vim.g.dotfiles_format_on_save to "
|
||||
(tostring vim.g.dotfiles_format_on_save))))
|
||||
{:desc "Toggle global formatting"})]})
|
||||
(tx :williamboman/mason-lspconfig.nvim
|
||||
{:tag :v1.32.0
|
||||
:dependencies [:williamboman/mason.nvim]
|
||||
@@ -191,8 +192,9 @@
|
||||
:Olical/nfnl]
|
||||
:keys [(tx :<leader>ca #(vim.lsp.buf.code_action)
|
||||
{:desc "Invoke code_action, prompting for an action to take at the cursor"})
|
||||
(tx :<leader>fa vim.lsp.buf.format
|
||||
; (fn [] ((. (require :conform) :format)))
|
||||
(tx :<leader>fa ; vim.lsp.buf.format
|
||||
(fn []
|
||||
((. (require :conform) :format)))
|
||||
{:desc "LSP format"})
|
||||
(tx :<leader>rn vim.lsp.buf.rename {:desc "LSP rename"})
|
||||
(tx :gd vim.lsp.buf.definition {:desc "Go to Definition"})
|
||||
@@ -270,8 +272,7 @@
|
||||
|
||||
(fn on_attach [client bufnr]
|
||||
;(each [mapping cmd (pairs core-nmappings)] ; (nbufmap mapping cmd {})) ; x mode mappings
|
||||
;(xbufmap :<leader>fa "lua vim.lsp.buf.format()"
|
||||
; {:desc "Format buffer"}) ; -- buf_set_keymap('n', 'gs', '<Cmd>lua vim.lsp.buf.document_symbol()<CR>', opts)
|
||||
;(xbufmap :<leader>fa "lua vim.lsp.buf.format()" ; {:desc "Format buffer"}) ; -- buf_set_keymap('n', 'gs', '<Cmd>lua vim.lsp.buf.document_symbol()<CR>', opts)
|
||||
; -- buf_set_keymap('n', 'gS', '<Cmd>lua vim.lsp.buf.workspace_symbol()<CR>', opts)
|
||||
; -- buf_set_keymap('n', 'gt', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
||||
; -- buf_set_keymap('n', '<leader>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
|
||||
@@ -309,7 +310,9 @@
|
||||
(if client.server_capabilities.documentFormattingProvider
|
||||
(vim.api.nvim_create_autocmd [:BufWritePre]
|
||||
{:pattern :<buffer>
|
||||
:callback vim.lsp.buf.format}))
|
||||
:callback (fn []
|
||||
((. (require :conform)
|
||||
:format)))}))
|
||||
(print "LSP Client Attached."))
|
||||
|
||||
(mlsp.setup_handlers (tx (fn [server-name]
|
||||
|
||||
@@ -1,45 +1,38 @@
|
||||
(import-macros {: tx} :config.macros)
|
||||
|
||||
(vim.api.nvim_create_autocmd
|
||||
"FileType"
|
||||
{:pattern ["*"]
|
||||
:callback #(vim.schedule #(pcall #(vim.treesitter.start)))})
|
||||
(vim.api.nvim_create_autocmd :FileType
|
||||
{:pattern ["*"]
|
||||
:callback #(vim.schedule #(pcall #(vim.treesitter.start)))})
|
||||
|
||||
(tx
|
||||
"nvim-treesitter/nvim-treesitter"
|
||||
{:main :nvim-treesitter.configs
|
||||
:branch "main"
|
||||
:build ":TSUpdate"
|
||||
:config (fn []
|
||||
|
||||
(let [ treesitter-configs (require :nvim-treesitter.config)]
|
||||
|
||||
(treesitter-configs.setup {:highlight {:enable true
|
||||
;; :additional_vim_regex_highlighting false
|
||||
:additional_vim_regex_highlighting [:org]}
|
||||
:ensure_installed :all
|
||||
; [:org]
|
||||
:rainbow {:enable true
|
||||
:extended_mode true
|
||||
; Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
|
||||
:max_file_lines 10000
|
||||
; Do not enable for files with more than 1000 lines, int
|
||||
:colors ["#dc322f"
|
||||
; red
|
||||
"#b58900"
|
||||
; yellow
|
||||
"#d33682"
|
||||
; magenta
|
||||
"#859900"
|
||||
; green
|
||||
"#2aa198"
|
||||
; cyan
|
||||
"#268bd2"
|
||||
; blue
|
||||
"#6c71c4"
|
||||
; violet / brmagenta
|
||||
]
|
||||
; table of hex strings
|
||||
}}))
|
||||
)
|
||||
})
|
||||
(tx :nvim-treesitter/nvim-treesitter
|
||||
{:branch :main
|
||||
:build (fn []
|
||||
(let [TS (require :nvim-treesitter)]
|
||||
(when (not TS.get_installed)
|
||||
(LazyVim.error "Please restart Neovim and run `:TSUpdate` to use the `nvim-treesitter` **main** branch."))
|
||||
; make sure we're using the latest treesitter util
|
||||
(set package.loaded.lazyvim.util.treesitter nil)
|
||||
(LazyVim.treesitter.build (fn []
|
||||
(TS.update nil {:summary true})))))
|
||||
:opts {:indent {:enable true}
|
||||
:highlight {:enable true}
|
||||
:folds {:enable true}
|
||||
:ensure_installed [:bash
|
||||
:clojure
|
||||
:diff
|
||||
:fennel
|
||||
:html
|
||||
:javascript
|
||||
:jsdoc
|
||||
:json
|
||||
:lua
|
||||
:luadoc
|
||||
:luap
|
||||
:markdown
|
||||
:markdown_inline
|
||||
:regex
|
||||
:toml
|
||||
:vim
|
||||
:vimdoc
|
||||
:xml
|
||||
:yaml]}})
|
||||
@@ -1,3 +1,3 @@
|
||||
-- [nfnl] fnl/dotfiles/plugin/treesitter.fnl
|
||||
local treesitter_configs = require("nvim-treesitter.configs")
|
||||
return treesitter_configs.setup({highlight = {enable = true, additional_vim_regex_highlighting = {"org"}}, ensure_installed = "all", rainbow = {enable = true, extended_mode = true, max_file_lines = 10000, colors = {"#dc322f", "#b58900", "#d33682", "#859900", "#2aa198", "#268bd2", "#6c71c4"}}})
|
||||
return treesitter_configs.setup({highlight = {enable = true, additional_vim_regex_highlighting = {"org"}}, ensure_installed = "all"})
|
||||
@@ -37,13 +37,62 @@ local function _11_()
|
||||
end
|
||||
client_command_lnmappings = {clojure_lsp = {ai = {"add-import-to-namespace", {_1_}}, am = {"add-missing-libspec", {}}, as = {"add-require-suggestion", {_2_, _3_, _4_}}, cc = {"cycle-coll", {}}, cn = {"clean-ns", {}}, cp = {"cycle-privacy", {}}, ct = {"create-test", {}}, df = {"drag-forward", {}}, db = {"drag-backward", {}}, dk = {"destructure-keys", {}}, ed = {"extract-to-def", {_5_}}, ref = {"extract-function", {_6_}}, el = {"expand-let", {}}, fe = {"create-function", {}}, il = {"introduce-let", {_7_}}, is = {"inline-symbol", {}}, ma = {"resolve-macro-as", {}}, mf = {"move-form", {_8_}}, ml = {"move-to-let", {_9_}}, pf = {"promote-fn", {_10_}}, sc = {"change-collection", {_11_, "input('Collection type: ')"}}, sm = {"sort-map", {}}, tf = {"thread-first-all", {}}, tF = {"thread-first", {}}, tl = {"thread-last-all", {}}, tL = {"thread-last", {}}, ua = {"unwind-all", {}}, uw = {"unwind-thread", {}}}}
|
||||
local vim = _G.vim
|
||||
local lsps = {"clojure_lsp", "lua_ls", "jsonls", "yamlls", "marksman", "html", "basedpyright", "ts_ls", "terraformls", "dockerls", "docker_compose_language_service", "bashls", "taplo", "sqlls"}
|
||||
local filetype__3eformatters = {lua = {"stylua"}, sh = {"shfmt"}, python = {"ruff_organize_imports", "ruff_format"}, rust = {"rustfmt"}, toml = {"taplo"}, clojure = {"cljfmt"}, json = {"prettierd"}, javascript = {"prettierd"}, typescript = {"prettierd"}, jsx = {"prettierd"}, html = {"prettierd"}, css = {"prettierd"}, yaml = {"prettierd"}, markdown = {"prettierd"}, fennel = {"fnlfmt"}, sql = {"sqlfmt"}, gleam = {"gleam"}, ["*"] = {"trim_whitespace", "trim_newlines"}}
|
||||
local lsps = {"clojure_lsp", "lua_ls", "jsonls", "yamlls", "marksman", "html", "terraformls", "dockerls", "docker_compose_language_service", "bashls", "sqlls"}
|
||||
local filetype__3eformatters = {lua = {"stylua"}, sh = {"shfmt"}, python = {"ruff_organize_imports", "ruff_format"}, rust = {"rustfmt"}, toml = {"taplo"}, json = {"prettierd"}, javascript = {"prettierd"}, typescript = {"prettierd"}, jsx = {"prettierd"}, html = {"prettierd"}, css = {"prettierd"}, yaml = {"prettierd"}, markdown = {"prettierd"}, fennel = {"fnlfmt"}, sql = {"sqlfmt"}, gleam = {"gleam"}, _ = {lsp_format = "prefer"}, ["*"] = {"trim_whitespace", "trim_newlines"}}
|
||||
local formatter__3epackage = {ruff_organize_imports = "ruff", ruff_format = "ruff"}
|
||||
local disable_formatter_on_save = {fennel = true, sql = true}
|
||||
local disable_formatter_auto_install = {cljfmt = true, fnlfmt = true, rustfmt = true, trim_whitespace = true, trim_newlines = true, gleam = true}
|
||||
vim.lsp.enable({"clojure", "fennel-ls", "typedclojure"})
|
||||
local function _12_()
|
||||
local function _12_(_, opts)
|
||||
local conform = require("conform")
|
||||
local registry = require("mason-registry")
|
||||
local formatters_for_mason = {}
|
||||
conform.formatters.shfmt = {prepend_args = {"-i", "2", "-ci"}}
|
||||
local function _13_()
|
||||
for _ft, formatters in pairs(filetype__3eformatters) do
|
||||
for _idx, formatter in ipairs(formatters) do
|
||||
if not disable_formatter_auto_install[formatter] then
|
||||
formatters_for_mason[(formatter__3epackage[formatter] or formatter)] = true
|
||||
else
|
||||
end
|
||||
end
|
||||
end
|
||||
for formatter, _true in pairs(formatters_for_mason) do
|
||||
local pkg = registry.get_package(formatter)
|
||||
if not pkg:is_installed() then
|
||||
vim.notify(("Automatically installing " .. formatter .. " with Mason."))
|
||||
pkg:install()
|
||||
else
|
||||
end
|
||||
end
|
||||
return nil
|
||||
end
|
||||
vim.schedule(_13_)
|
||||
vim.g.dotfiles_format_on_save = true
|
||||
conform.setup(opts)
|
||||
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
||||
return nil
|
||||
end
|
||||
local function _16_()
|
||||
if (nil == vim.b.dotfiles_format_on_save) then
|
||||
vim.b.dotfiles_format_on_save = false
|
||||
else
|
||||
vim.b.dotfiles_format_on_save = not vim.b.dotfiles_format_on_save
|
||||
end
|
||||
return vim.notify(("Set vim.b.dotfiles_format_on_save to " .. tostring(vim.b.dotfiles_format_on_save)))
|
||||
end
|
||||
local function _18_()
|
||||
vim.g.dotfiles_format_on_save = not vim.g.dotfiles_format_on_save
|
||||
return vim.notify(("Set vim.g.dotfiles_format_on_save to " .. tostring(vim.g.dotfiles_format_on_save)))
|
||||
end
|
||||
local function _19_(_buf)
|
||||
if (vim.g.dotfiles_format_on_save and ((nil == vim.b.dotfiles_format_on_save) or vim.b.dotfiles_format_on_save) and not disable_formatter_on_save[vim.bo.filetype]) then
|
||||
return {timeout_ms = 500, lsp_format = "fallback"}
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
local function _21_()
|
||||
local caps = require("cmp_nvim_lsp").default_capabilities()
|
||||
local mlsp = require("mason-lspconfig")
|
||||
local a = require("nfnl.core")
|
||||
@@ -86,24 +135,24 @@ local function _12_()
|
||||
local lsp_cmd = a.first(command_mapping)
|
||||
local mapping = ("<leader>" .. lnmapping)
|
||||
local cmd
|
||||
local function _14_()
|
||||
local function _23_()
|
||||
local opts
|
||||
do
|
||||
local s = ""
|
||||
for _i, opt in ipairs(a.second(command_mapping)) do
|
||||
local _15_
|
||||
local _24_
|
||||
if ("function" == type(opt)) then
|
||||
_15_ = opt()
|
||||
_24_ = opt()
|
||||
else
|
||||
_15_ = opt
|
||||
_24_ = opt
|
||||
end
|
||||
s = (s .. _15_)
|
||||
s = (s .. _24_)
|
||||
end
|
||||
opts = s
|
||||
end
|
||||
return lsp_execute_command(client, lsp_cmd, opts)
|
||||
end
|
||||
cmd = _14_
|
||||
cmd = _23_
|
||||
nbufmap(mapping, cmd, {desc = ("LSP command `" .. lsp_cmd .. "`")})
|
||||
end
|
||||
return nil
|
||||
@@ -119,29 +168,35 @@ local function _12_()
|
||||
vim.api.nvim_set_hl(0, hlgroup, a.merge(vim.api.nvim_get_hl_by_name(base_group, true), {italic = true, foreground = "#6c71c4", background = "NONE"}))
|
||||
end
|
||||
local group = vim.api.nvim_create_augroup("LspDocumentHighlight", {clear = true})
|
||||
local function _18_()
|
||||
local function _27_()
|
||||
return vim.lsp.buf.document_highlight()
|
||||
end
|
||||
vim.api.nvim_create_autocmd({"CursorHold", "CursorHoldI"}, {group = group, pattern = "<buffer>", callback = _18_})
|
||||
local function _19_()
|
||||
vim.api.nvim_create_autocmd({"CursorHold", "CursorHoldI"}, {group = group, pattern = "<buffer>", callback = _27_})
|
||||
local function _28_()
|
||||
return vim.lsp.buf.clear_references()
|
||||
end
|
||||
vim.api.nvim_create_autocmd({"CursorMoved"}, {group = group, pattern = "<buffer>", callback = _19_})
|
||||
vim.api.nvim_create_autocmd({"CursorMoved"}, {group = group, pattern = "<buffer>", callback = _28_})
|
||||
else
|
||||
end
|
||||
if client.server_capabilities.documentFormattingProvider then
|
||||
vim.api.nvim_create_autocmd({"BufWritePre"}, {pattern = "<buffer>", callback = vim.lsp.buf.format})
|
||||
local function _30_()
|
||||
return require("conform").format()
|
||||
end
|
||||
vim.api.nvim_create_autocmd({"BufWritePre"}, {pattern = "<buffer>", callback = _30_})
|
||||
else
|
||||
end
|
||||
return print("LSP Client Attached.")
|
||||
end
|
||||
local function _22_(server_name)
|
||||
local function _32_(server_name)
|
||||
vim.lsp.config(server_name, {capabilities = caps, on_attach = on_attach})
|
||||
return vim.lsp.enable(server_name)
|
||||
end
|
||||
return mlsp.setup_handlers({_22_})
|
||||
return mlsp.setup_handlers({_32_})
|
||||
end
|
||||
local function _23_()
|
||||
local function _33_()
|
||||
return vim.lsp.buf.code_action()
|
||||
end
|
||||
return {{"folke/lsp-colors.nvim"}, {"williamboman/mason.nvim", opts = {}, tag = "v1.11.0"}, {"williamboman/mason-lspconfig.nvim", dependencies = {"williamboman/mason.nvim"}, opts = {ensure_installed = lsps, automatic_installation = true}, tag = "v1.32.0"}, {"neovim/nvim-lspconfig", config = _12_, dependencies = {"williamboman/mason-lspconfig.nvim", "hrsh7th/cmp-nvim-lsp", "stevearc/conform.nvim", "Olical/nfnl"}, keys = {{"<leader>ca", _23_, desc = "Invoke code_action, prompting for an action to take at the cursor"}, {"<leader>fa", vim.lsp.buf.format, desc = "LSP format"}, {"<leader>rn", vim.lsp.buf.rename, desc = "LSP rename"}, {"gd", vim.lsp.buf.definition, desc = "Go to Definition"}, {"gD", vim.lsp.buf.declaration, desc = "Go to Declaration"}, {"gi", vim.lsp.buf.implementation, desc = "Go to Implementation"}, {"gr", vim.lsp.buf.references, desc = "Show References"}, {"K", vim.lsp.buf.hover, desc = "LSP Hover"}, {"[g", vim.lsp.diagnostic.goto_prev, desc = "Previous Diagnostic"}, {"]g", vim.lsp.diagnostic.goto_next, desc = "Next Diagnostic"}, {"<c-k>", vim.lsp.buf.signature_help, desc = "Signature Help"}}, lazy = false}, {"RubixDev/mason-update-all", cmd = "MasonUpdateAll", dependencies = {"williamboman/mason.nvim", "Olical/nfnl"}, main = "mason-update-all", opts = {}}}
|
||||
local function _34_()
|
||||
return require("conform").format()
|
||||
end
|
||||
return {{"folke/lsp-colors.nvim"}, {"williamboman/mason.nvim", opts = {}, tag = "v1.11.0"}, {"stevearc/conform.nvim", config = _12_, dependencies = {"rcarriga/nvim-notify"}, keys = {{"<leader>tbf", _16_, desc = "Toggle buffer formatting"}, {"<leader>tgf", _18_, desc = "Toggle global formatting"}}, opts = {formatters_by_ft = filetype__3eformatters, format_on_save = _19_}}, {"williamboman/mason-lspconfig.nvim", dependencies = {"williamboman/mason.nvim"}, opts = {ensure_installed = lsps, automatic_installation = true}, tag = "v1.32.0"}, {"neovim/nvim-lspconfig", config = _21_, dependencies = {"williamboman/mason-lspconfig.nvim", "hrsh7th/cmp-nvim-lsp", "stevearc/conform.nvim", "Olical/nfnl"}, keys = {{"<leader>ca", _33_, desc = "Invoke code_action, prompting for an action to take at the cursor"}, {"<leader>fa", _34_, desc = "LSP format"}, {"<leader>rn", vim.lsp.buf.rename, desc = "LSP rename"}, {"gd", vim.lsp.buf.definition, desc = "Go to Definition"}, {"gD", vim.lsp.buf.declaration, desc = "Go to Declaration"}, {"gi", vim.lsp.buf.implementation, desc = "Go to Implementation"}, {"gr", vim.lsp.buf.references, desc = "Show References"}, {"K", vim.lsp.buf.hover, desc = "LSP Hover"}, {"[g", vim.lsp.diagnostic.goto_prev, desc = "Previous Diagnostic"}, {"]g", vim.lsp.diagnostic.goto_next, desc = "Next Diagnostic"}, {"<c-k>", vim.lsp.buf.signature_help, desc = "Signature Help"}}, lazy = false}, {"RubixDev/mason-update-all", cmd = "MasonUpdateAll", dependencies = {"williamboman/mason.nvim", "Olical/nfnl"}, main = "mason-update-all", opts = {}}}
|
||||
@@ -10,7 +10,15 @@ local function _1_()
|
||||
end
|
||||
vim.api.nvim_create_autocmd("FileType", {pattern = {"*"}, callback = _1_})
|
||||
local function _4_()
|
||||
local treesitter_configs = require("nvim-treesitter.config")
|
||||
return treesitter_configs.setup({highlight = {enable = true, additional_vim_regex_highlighting = {"org"}}, ensure_installed = "all", rainbow = {enable = true, extended_mode = true, max_file_lines = 10000, colors = {"#dc322f", "#b58900", "#d33682", "#859900", "#2aa198", "#268bd2", "#6c71c4"}}})
|
||||
local TS = require("nvim-treesitter")
|
||||
if not TS.get_installed then
|
||||
LazyVim.error("Please restart Neovim and run `:TSUpdate` to use the `nvim-treesitter` **main** branch.")
|
||||
else
|
||||
end
|
||||
package.loaded.lazyvim.util.treesitter = nil
|
||||
local function _6_()
|
||||
return TS.update(nil, {summary = true})
|
||||
end
|
||||
return LazyVim.treesitter.build(_6_)
|
||||
end
|
||||
return {"nvim-treesitter/nvim-treesitter", branch = "main", build = ":TSUpdate", config = _4_, main = "nvim-treesitter.configs"}
|
||||
return {"nvim-treesitter/nvim-treesitter", branch = "main", build = _4_, opts = {indent = {enable = true}, highlight = {enable = true}, folds = {enable = true}, ensure_installed = {"bash", "clojure", "diff", "fennel", "html", "javascript", "jsdoc", "json", "lua", "luadoc", "luap", "markdown", "markdown_inline", "regex", "toml", "vim", "vimdoc", "xml", "yaml"}}}
|
||||
Reference in new issue
Block a user