aboutsummaryrefslogtreecommitdiff
path: root/nvim/lua
diff options
context:
space:
mode:
Diffstat (limited to 'nvim/lua')
-rw-r--r--nvim/lua/config/lazy.lua20
-rw-r--r--nvim/lua/config/lsp.lua94
-rw-r--r--nvim/lua/config/options.lua3
-rw-r--r--nvim/lua/plugins/colorscheme.lua21
-rw-r--r--nvim/lua/plugins/lsp.lua1
-rw-r--r--nvim/lua/plugins/neorg.lua20
6 files changed, 96 insertions, 63 deletions
diff --git a/nvim/lua/config/lazy.lua b/nvim/lua/config/lazy.lua
index d640deb..e188e5b 100644
--- a/nvim/lua/config/lazy.lua
+++ b/nvim/lua/config/lazy.lua
@@ -4,13 +4,13 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
- vim.api.nvim_echo({
- { "Failed to clone lazy.nvim:\n", "ErrorMsg" },
- { out, "WarningMsg" },
- { "\nPress any key to exit..." },
- }, true, {})
- vim.fn.getchar()
- os.exit(1)
+ vim.api.nvim_echo({
+ { "Failed to clone lazy.nvim:\n", "ErrorMsg" },
+ { out, "WarningMsg" },
+ { "\nPress any key to exit..." },
+ }, true, {})
+ vim.fn.getchar()
+ os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
@@ -20,12 +20,12 @@ require("config.options")
-- Setup lazy.nvim
require("lazy").setup({
spec = {
- -- import your plugins
- { import = "plugins" },
+ -- import your plugins
+ { import = "plugins" },
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
- install = { colorscheme = { "modus_vivendi" } },
+ install = { colorscheme = { "kanagawa" } },
-- automatically check for plugin updates
checker = { enabled = true },
})
diff --git a/nvim/lua/config/lsp.lua b/nvim/lua/config/lsp.lua
index 395e998..8ff5a9f 100644
--- a/nvim/lua/config/lsp.lua
+++ b/nvim/lua/config/lsp.lua
@@ -1,55 +1,55 @@
-vim.lsp.enable({ "rust_analyzer", "nil_ls", "denols", "html", "cssls", "lua_ls" })
+vim.lsp.enable({ "rust_analyzer", "nil_ls", "denols", "html", "cssls", "lua_ls", "pylsp" })
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
+ 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 = {},
- },
+ 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/config/options.lua b/nvim/lua/config/options.lua
index b703960..4da5844 100644
--- a/nvim/lua/config/options.lua
+++ b/nvim/lua/config/options.lua
@@ -19,3 +19,6 @@ vim.opt.ignorecase = true;
vim.opt.smartcase = true;
vim.opt.autochdir = true;
vim.opt.colorcolumn = "80";
+
+vim.wo.foldlevel = 99
+vim.wo.conceallevel = 2
diff --git a/nvim/lua/plugins/colorscheme.lua b/nvim/lua/plugins/colorscheme.lua
index 4e890f5..7d2f14f 100644
--- a/nvim/lua/plugins/colorscheme.lua
+++ b/nvim/lua/plugins/colorscheme.lua
@@ -1,8 +1,17 @@
return {
- "miikanissi/modus-themes.nvim",
- version = "*",
- priority = 1000,
- opts = {
- style = "modus_vivendi", -- só quero o tema escuro
- },
+ {
+ "miikanissi/modus-themes.nvim",
+ version = "*",
+ priority = 1000,
+ opts = {
+ style = "modus_vivendi", -- só quero o tema escuro
+ },
+ },
+ {
+ "rebelot/kanagawa.nvim", -- neorg needs a colorscheme with treesitter support
+ version = "*",
+ opts = {
+ theme = "lotus", -- só quero o tema claro
+ },
+ },
}
diff --git a/nvim/lua/plugins/lsp.lua b/nvim/lua/plugins/lsp.lua
index 704d5c7..6d53fd8 100644
--- a/nvim/lua/plugins/lsp.lua
+++ b/nvim/lua/plugins/lsp.lua
@@ -29,6 +29,7 @@ return {
"typescript",
"javascript",
"lua",
+ "norg",
},
incremental_selection = {
enable = true,
diff --git a/nvim/lua/plugins/neorg.lua b/nvim/lua/plugins/neorg.lua
new file mode 100644
index 0000000..d25407f
--- /dev/null
+++ b/nvim/lua/plugins/neorg.lua
@@ -0,0 +1,20 @@
+return {
+ "nvim-neorg/neorg",
+ lazy = false, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default
+ version = "*", -- Pin Neorg to the latest stable release
+ config = true,
+ opts = {
+ load = {
+ ["core.defaults"] = {},
+ ["core.concealer"] = {},
+ ["core.dirman"] = {
+ config = {
+ workspaces = {
+ notas = "~/notas",
+ },
+ default_workspace = "notas",
+ },
+ },
+ },
+ },
+}