diff --git a/nvim/lazynvim/lua/config/autocmds.lua b/nvim/lazynvim/lua/config/autocmds.lua index 9b70bc1..c519ab1 100644 --- a/nvim/lazynvim/lua/config/autocmds.lua +++ b/nvim/lazynvim/lua/config/autocmds.lua @@ -1,28 +1,29 @@ local defaultGroupOptions = { clear = true } local markdownGroup = vim.api.nvim_create_augroup("MyMarkdownGroup", defaultGroupOptions) -local spellGroup = vim.api.nvim_create_augroup("SpellGroup", defaultGroupOptions) local createCmd = vim.api.nvim_create_autocmd --- Spell check --- createCmd("BufEnter", { --- pattern = { "*.md", "*.markdown", "*.txt", "*.tex" }, --- group = spellGroup, --- callback = function(_) --- vim.cmd.setlocal("textwidth=100") --- vim.cmd.setlocal("spell spelllang=en_us") --- end, --- }) +createCmd("BufEnter", { + pattern = "*.md", + group = markdownGroup, + callback = function(_) + -- HACK: Set filetype to markdown for '.md' files. + -- Not sure why it doesn't detect these as markdown files, but this fixes the issue. + vim.cmd.setlocal("filetype=markdown") + vim.cmd.setlocal("textwidth=80") + vim.cmd.setlocal("spell spelllang=en_us") + end, +}) -- Markdown --- createCmd("BufWritePost", { --- pattern = { "*.md", "*.markdown" }, --- group = markdownGroup, --- callback = function(_) --- local cursor = vim.fn.getpos(".") --- vim.cmd("FormatWrite") --- vim.fn.setpos(".", cursor) --- end, --- }) +createCmd("BufWritePost", { + pattern = { "*.md", "*.markdown" }, + group = markdownGroup, + callback = function(_) + local cursor = vim.fn.getpos(".") + vim.cmd("FormatWrite") + vim.fn.setpos(".", cursor) + end, +}) -- Go createCmd("BufWritePre", { diff --git a/nvim/lazynvim/lua/config/lazy.lua b/nvim/lazynvim/lua/config/lazy.lua index 37e86e7..7f73575 100644 --- a/nvim/lazynvim/lua/config/lazy.lua +++ b/nvim/lazynvim/lua/config/lazy.lua @@ -18,13 +18,6 @@ require("lazy").setup({ spec = { -- add LazyVim and import its plugins { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - -- { import = "lazyvim.plugins.extras.lang.ansible" }, - -- { import = "lazyvim.plugins.extras.lang.cmake" }, - -- { import = "lazyvim.plugins.extras.lang.docker" }, - -- { import = "lazyvim.plugins.extras.lang.json" }, - -- { import = "lazyvim.plugins.extras.lang.markdown" }, - -- { import = "lazyvim.plugins.extras.lang.yaml" }, - -- { import = "lazyvim.plugins.extras.coding.luasnip" }, { import = "lazyvim.plugins.extras.editor.mini-files", opts = { diff --git a/nvim/lazynvim/lua/plugins/cmp.lua b/nvim/lazynvim/lua/plugins/cmp.lua new file mode 100644 index 0000000..84fba81 --- /dev/null +++ b/nvim/lazynvim/lua/plugins/cmp.lua @@ -0,0 +1,8 @@ +return { + "saghen/blink.cmp", + opts = { + keymap = { + preset = "default" + } + } +} diff --git a/nvim/lazynvim/lua/plugins/formatter.lua b/nvim/lazynvim/lua/plugins/formatter.lua index f7934e3..7ca3e28 100644 --- a/nvim/lazynvim/lua/plugins/formatter.lua +++ b/nvim/lazynvim/lua/plugins/formatter.lua @@ -6,9 +6,7 @@ return { markdown = { "prettier", prepend_args = { - "--print-width", "80", - "--prose-wrap", "always", - "--parser", "markdown", + "--config", "~/.prettierrc.yaml" }, }, swift = { "swiftformat" }, diff --git a/zsh/config/.zshrc b/zsh/config/.zshrc index 56bcd02..04fe0e8 100755 --- a/zsh/config/.zshrc +++ b/zsh/config/.zshrc @@ -175,9 +175,9 @@ alias gs='git status' # git status quickly alias hn='hugo new' # generate a hugo site alias hnc='hugo new content' # generate new hugo site content quickly alias j='just' # run justfile's quickly. -alias l='eza --long --git --group --links --icons' # better ls command. +alias l='eza --long --git --group --links --icons --all' # better ls command. alias lfs='ls -lahH --color=auto "$ZDOTDIR/functions"' # List functions. -alias ls='eza --long --git --group --links --icons' +alias ls='eza --long --git --group --links --icons --all' alias lt='eza --long --git --group --links --icons --tree' alias pass='gopass' alias p='gopass' # run the pass command quickly.