summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/config
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/config')
-rw-r--r--.config/nvim/lua/config/defaults.lua24
-rw-r--r--.config/nvim/lua/config/init.lua6
2 files changed, 18 insertions, 12 deletions
diff --git a/.config/nvim/lua/config/defaults.lua b/.config/nvim/lua/config/defaults.lua
index 82c08a4..f62fd87 100644
--- a/.config/nvim/lua/config/defaults.lua
+++ b/.config/nvim/lua/config/defaults.lua
@@ -1,3 +1,4 @@
+local home_dir = vim.loop.os_homedir()
CONFIG_PATH = vim.fn.stdpath "config"
DATA_PATH = vim.fn.stdpath "data"
CACHE_PATH = vim.fn.stdpath "cache"
@@ -11,7 +12,7 @@ options = {
line_wrap_cursor_movement = true,
transparent_window = false,
format_on_save = true,
- vsnip_dir = os.getenv "HOME" .. "/.config/snippets",
+ vsnip_dir = home_dir .. "/.config/snippets",
database = { save_location = "~/.config/nvim_db", auto_execute = 1 },
keys = {},
@@ -336,7 +337,7 @@ options.lang = {
},
},
},
- docker = {
+ dockerfile = {
formatters = {},
linters = {},
lsp = {
@@ -953,15 +954,16 @@ options.lang = {
},
},
tailwindcss = {
- active = false,
- filetypes = {
- "html",
- "css",
- "scss",
- "javascript",
- "javascriptreact",
- "typescript",
- "typescriptreact",
+ lsp = {
+ active = false,
+ provider = "tailwindcss",
+ setup = {
+ cmd = {
+ DATA_PATH
+ .. "/lspinstall/tailwindcss/node_modules/.bin/tailwindcss-language-server",
+ "--stdio",
+ },
+ },
},
},
terraform = {
diff --git a/.config/nvim/lua/config/init.lua b/.config/nvim/lua/config/init.lua
index e6d6389..7d42ad1 100644
--- a/.config/nvim/lua/config/init.lua
+++ b/.config/nvim/lua/config/init.lua
@@ -1,5 +1,6 @@
+local home_dir = vim.loop.os_homedir()
local M = {
- path = string.format("%s/.config/nvim/config.lua", os.getenv "HOME"),
+ path = string.format("%s/.config/nvim/config.lua", home_dir),
}
--- Initialize nvim default configuration
@@ -19,6 +20,7 @@ end
--- Override the configuration with a user provided one
-- @param config_path The path to the configuration overrides
function M:load(config_path)
+ local autocmds = require "core.autocmds"
config_path = config_path or self.path
local ok, err = pcall(vim.cmd, "luafile " .. config_path)
if not ok then
@@ -29,6 +31,8 @@ function M:load(config_path)
self.path = config_path
+ autocmds.define_augroups(options.autocommands)
+
local settings = require "config.settings"
settings.load_commands()
end