diff options
Diffstat (limited to 'config/lua')
| -rw-r--r-- | config/lua/getchoo/efmls.lua | 60 | ||||
| -rw-r--r-- | config/lua/getchoo/init.lua | 23 |
2 files changed, 83 insertions, 0 deletions
diff --git a/config/lua/getchoo/efmls.lua b/config/lua/getchoo/efmls.lua new file mode 100644 index 0000000..10d1dee --- /dev/null +++ b/config/lua/getchoo/efmls.lua @@ -0,0 +1,60 @@ +local alex = require("efmls-configs.linters.alex") +alex.rootMarkers = nil +local actionlint = require("efmls-configs.linters.actionlint") +local beautysh = require("efmls-configs.formatters.beautysh") +local codespell = require("efmls-configs.linters.codespell") +local fish_indent = require("efmls-configs.formatters.fish_indent") +local prettier = require("efmls-configs.formatters.prettier") +local prettier_eslint = require("efmls-configs.formatters.prettier_eslint") +local selene = require("efmls-configs.linters.selene") +local shellcheck = require("efmls-configs.linters.shellcheck") +local statix = require("efmls-configs.linters.statix") +local stylua = require("efmls-configs.formatters.stylua") + +local languages = { + all = { alex, codespell }, + + bash = { + beautysh, + }, + + css = { prettier }, + + fish = { fish_indent }, + + html = { prettier }, + + javascript = { prettier_eslint }, + + json = { prettier }, + + lua = { selene, stylua }, + + nix = { statix }, + + sass = { prettier }, + + scss = { prettier }, + + sh = { beautysh, shellcheck }, + + typescript = { prettier_eslint }, + + yaml = { prettier, actionlint }, + + zsh = { beautysh }, +} + +return { + filetypes = vim.tbl_keys(languages), + + settings = { + rootMarkers = { ".git/" }, + languages = languages, + }, + + init_options = { + documentFormatting = true, + documentRangeFormatting = true, + }, +} diff --git a/config/lua/getchoo/init.lua b/config/lua/getchoo/init.lua new file mode 100644 index 0000000..c73e88d --- /dev/null +++ b/config/lua/getchoo/init.lua @@ -0,0 +1,23 @@ +local opt = vim.opt + +opt.shiftwidth = 2 +opt.tabstop = 2 +-- https://www.reddit.com/r/neovim/comments/14n6iiy/if_you_have_treesitter_make_sure_to_disable +-- TLDR: this breaks things with treesitter indent +opt.smartindent = false +opt.wrap = true +opt.syntax = "on" +opt.termguicolors = true + +local backupDir = vim.fn.stdpath("state") .. "/backup" +local b = io.open(backupDir, "r") +if b then + b:close() +else + os.execute("mkdir -p " .. backupDir) +end + +opt.backupdir = backupDir + +vim.g.mapleader = "," +vim.g.do_filetype_lua = 1 |
