summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRayHammer <mail@rayhammer.dev>2023-05-12 19:41:39 +0200
committerRayHammer <mail@rayhammer.dev>2023-05-12 19:41:39 +0200
commit163065fc7e7faea384f72b7f62f59541f3f28257 (patch)
tree37f8236d5c60cda9461e32bae77312bd7b69637a
parentc41de9c07d7e700179ae99a2276073be18ab5287 (diff)
Updated init.lua
-rw-r--r--lua/config/.neo-tree.default.lua2
-rw-r--r--lua/init.lua37
2 files changed, 21 insertions, 18 deletions
diff --git a/lua/config/.neo-tree.default.lua b/lua/config/.neo-tree.default.lua
index 95c720c..03e5b23 100644
--- a/lua/config/.neo-tree.default.lua
+++ b/lua/config/.neo-tree.default.lua
@@ -1,4 +1,4 @@
-local config = {
+local _ = {
-- If a user has a sources list it will replace this one.
-- Only sources listed here will be loaded.
-- You can also add an external source by adding it's name to this list.
diff --git a/lua/init.lua b/lua/init.lua
index f493729..604fd4d 100644
--- a/lua/init.lua
+++ b/lua/init.lua
@@ -1,9 +1,9 @@
-local function dump(o)
+function Dump(o)
if type(o) == 'table' then
local s = '{ '
for k,v in pairs(o) do
if type(k) ~= 'number' then k = '"'..k..'"' end
- s = s .. '['..k..'] = ' .. dump(v) .. ','
+ s = s .. '['..k..'] = ' .. Dump(v) .. ','
end
return s .. '} '
else
@@ -15,6 +15,7 @@ end
local neotree = require("neo-tree")
neotree.setup({
close_if_last_window = false,
+ enable_refresh_on_write = true,
icon = {
folder_closed = "",
folder_open = "",
@@ -48,13 +49,6 @@ neotree.setup({
hide_dotfiles = false,
}
},
- event_handlers = {
- event = "vim_buffer_changed",
- handler = function(_)
- vim.cmd('Git status')
- end,
- id = "AutoGitStatus",
- }
})
-- LSP
@@ -101,14 +95,23 @@ local lsp_capabilibies = require('cmp_nvim_lsp').default_capabilities(
local servers = mason_lspconfig.get_installed_servers()
local configs_custom = {
lua_ls = {
- diagnostics = {
- -- Get the language server to recognize the `vim` global
- globals = {'vim'},
- },
- workspace = {
- -- Make the server aware of Neovim runtime files
- library = vim.api.nvim_get_runtime_file("", true),
- },
+ settings = {
+ Lua = {
+ runtime = {
+ -- Tell the language server which version of Lua you're using
+ -- (most likely LuaJIT in the case of Neovim)
+ version = 'LuaJIT',
+ },
+ diagnostics = {
+ -- Get the language server to recognize the `vim` global
+ globals = {'vim'},
+ },
+ workspace = {
+ -- Make the server aware of Neovim runtime files
+ library = vim.api.nvim_get_runtime_file("", true),
+ },
+ },
+ }
}
}