aboutsummaryrefslogtreecommitdiff
path: root/nvim
diff options
context:
space:
mode:
authorGravatar Marina Barros <azulmarina799@gmail.com> 2026-03-07 20:20:14 +0000
committerGravatar Marina Barros <azulmarina799@gmail.com> 2026-03-21 23:36:53 +0000
commit03485bd0ac00c582e0dccb9187866420666a2f42 (patch)
tree5c68d70c04404ee6c87530d99187fa14f9e32dcc /nvim
parent171ffed14d6796513e972829a378d723137b517b (diff)
adicionado ashell, ajustes
Diffstat (limited to 'nvim')
-rw-r--r--nvim/lazy-lock.json31
-rw-r--r--nvim/lua/config/lsp.lua56
-rw-r--r--nvim/lua/plugins/none-ls.lua20
3 files changed, 61 insertions, 46 deletions
diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json
deleted file mode 100644
index 966a58f..0000000
--- a/nvim/lazy-lock.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
- "blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" },
- "flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
- "gitsigns.nvim": { "branch": "main", "commit": "9f3c6dd7868bcc116e9c1c1929ce063b978fa519" },
- "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
- "lsp-format.nvim": { "branch": "master", "commit": "42d1d3e407c846d95f84ea3767e72ed6e08f7495" },
- "mini.ai": { "branch": "main", "commit": "bfb26d9072670c3aaefab0f53024b2f3729c8083" },
- "mini.align": { "branch": "main", "commit": "60c61c8c63dca41b5ac6bfc36b52df69b1a03e6b" },
- "mini.bracketed": { "branch": "main", "commit": "e50e3abcf6a3a5d234f58e4a247dfb3035f30a65" },
- "mini.pairs": { "branch": "main", "commit": "d5a29b6254dad07757832db505ea5aeab9aad43a" },
- "mini.statusline": { "branch": "main", "commit": "14919901649d20d020e659c63c03baa75cd94f33" },
- "mini.surround": { "branch": "main", "commit": "88c52297ed3e69ecf9f8652837888ecc727a28ee" },
- "mini.tabline": { "branch": "main", "commit": "caf23615b9b99bacc79ecd60f61c4e6a8ec18c84" },
- "modus-themes.nvim": { "branch": "master", "commit": "c57c2c56c9f0af04f3b609d11caa840880074784" },
- "nix-develop.nvim": { "branch": "main", "commit": "bfba63d6c129d8b5073fe9eb965c9acee04becb0" },
- "none-ls.nvim": { "branch": "main", "commit": "f61f46ded0ca9edce7a09b674f8e162d10921426" },
- "nvim-lspconfig": { "branch": "master", "commit": "44acfe887d4056f704ccc4f17513ed41c9e2b2e6" },
- "nvim-neoclip.lua": { "branch": "main", "commit": "831a97c7697736411a05ff8b91e8798ea4c2d6fb" },
- "nvim-treesitter": { "branch": "main", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
- "nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" },
- "oil-git.nvim": { "branch": "main", "commit": "c99db7b1dd8dd500c3ec530dc07000dfbeb6e080" },
- "oil.nvim": { "branch": "master", "commit": "0fcc83805ad11cf714a949c98c605ed717e0b83e" },
- "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
- "quicker.nvim": { "branch": "master", "commit": "2d3f3276eab9352c7b212821c218aca986929f62" },
- "render-markdown.nvim": { "branch": "main", "commit": "1c958131c083c8557ea499fdb08c88b8afb05c4e" },
- "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
- "telescope.nvim": { "branch": "master", "commit": "3333a52ff548ba0a68af6d8da1e54f9cd96e9179" },
- "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
- "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
-}
diff --git a/nvim/lua/config/lsp.lua b/nvim/lua/config/lsp.lua
index 6c30fc8..395e998 100644
--- a/nvim/lua/config/lsp.lua
+++ b/nvim/lua/config/lsp.lua
@@ -1,7 +1,55 @@
-vim.lsp.enable({"rust_analyzer", "nil_ls", "denols", "html", "cssls"})
+vim.lsp.enable({ "rust_analyzer", "nil_ls", "denols", "html", "cssls", "lua_ls" })
vim.lsp.config("*", {
- onAttach = function(client, _)
- client.server_capabilities.semanticTokensProvider = nil
- end,
+ onAttach = function(client, _)
+ client.server_capabilities.semanticTokensProvider = nil
+ end,
+})
+
+-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#lua_ls
+vim.lsp.config("lua_ls", {
+ on_init = function(client)
+ if client.workspace_folders then
+ local path = client.workspace_folders[1].name
+ if
+ path ~= vim.fn.stdpath("config")
+ and (vim.uv.fs_stat(path .. "/.luarc.json") or vim.uv.fs_stat(path .. "/.luarc.jsonc"))
+ then
+ return
+ end
+ end
+
+ client.config.settings.Lua = vim.tbl_deep_extend("force", client.config.settings.Lua, {
+ runtime = {
+ -- Tell the language server which version of Lua you're using (most
+ -- likely LuaJIT in the case of Neovim)
+ version = "LuaJIT",
+ -- Tell the language server how to find Lua modules same way as Neovim
+ -- (see `:h lua-module-load`)
+ path = {
+ "lua/?.lua",
+ "lua/?/init.lua",
+ },
+ },
+ -- Make the server aware of Neovim runtime files
+ workspace = {
+ checkThirdParty = false,
+ library = {
+ vim.env.VIMRUNTIME,
+ -- Depending on the usage, you might want to add additional paths
+ -- here.
+ -- '${3rd}/luv/library',
+ -- '${3rd}/busted/library',
+ },
+ -- Or pull in all of 'runtimepath'.
+ -- NOTE: this is a lot slower and will cause issues when working on
+ -- your own configuration.
+ -- See https://github.com/neovim/nvim-lspconfig/issues/3189
+ -- library = vim.api.nvim_get_runtime_file('', true),
+ },
+ })
+ end,
+ settings = {
+ Lua = {},
+ },
})
diff --git a/nvim/lua/plugins/none-ls.lua b/nvim/lua/plugins/none-ls.lua
index fd28379..176c8f5 100644
--- a/nvim/lua/plugins/none-ls.lua
+++ b/nvim/lua/plugins/none-ls.lua
@@ -1,14 +1,12 @@
-- ripped from https://www.lazyvim.org/extras/lsp/none-ls
return {
- "nvimtools/none-ls.nvim",
- opts = function(_, opts)
- local nls = require("null-ls")
- opts.root_dir = opts.root_dir
- or require("null-ls.utils").root_pattern(".null-ls-root", ".neoconf.json", "Makefile", ".git")
- opts.sources = vim.list_extend(opts.sources or {}, {
- nls.builtins.formatting.stylua,
- nls.builtins.formatting.alejandra,
- nls.builtins.formatting.prettier,
- })
- end,
+ "nvimtools/none-ls.nvim",
+ opts = function(_, opts)
+ local nls = require("null-ls")
+ opts.root_dir = opts.root_dir
+ or require("null-ls.utils").root_pattern(".null-ls-root", ".neoconf.json", "Makefile", ".git")
+ opts.sources = vim.list_extend(opts.sources or {}, {
+ nls.builtins.formatting.alejandra,
+ })
+ end,
}