Skip to content

Commit

Permalink
chore: push minor open changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Jun 10, 2024
1 parent 292f950 commit 11549b0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 26 deletions.
25 changes: 0 additions & 25 deletions lua/nxvim/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -274,31 +274,6 @@ nx.map({
}, { desc = "Fix: Scrolling with Acceleration" })
-- <== }

-- { == Filetype Keymaps ==> ==================================================

---@param key string
local function indent_new_line(key)
local line, indent_lvl = string.gsub(vim.api.nvim_get_current_line(), "\t", "")
local last_char = string.sub(line, -1)
if last_char == ":" or last_char == "=" then indent_lvl = indent_lvl + 1 end
return key .. string.rep("\t", indent_lvl)
end

nx.map({
{ "o", function() return indent_new_line("o") end },
{ "O", function() return indent_new_line("O") end },
{ "<CR>", function() return indent_new_line("<CR>") end, "i" },
{
"<Esc>",
function()
local trimmed_line = vim.api.nvim_get_current_line():match("^%s*(.*%S)") or ""
return trimmed_line == "" and "<Esc>g_<S-d>" or "<Esc>"
end,
"i",
},
}, { expr = true, silent = true, ft = "nim" })
-- <== }

-- { == Plugin Keymaps ==> ====================================================

-- Plugin related keymaps are located inside the corresponding plugins config directory
Expand Down
1 change: 1 addition & 0 deletions lua/nxvim/lsp/plugins/mason/lspconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ mason_lspconfig.setup_handlers({
if server == "jsonls" then opts.init_options = { provideFormatter = false } end
-- Handled by rust-tools.
if server == "rust_analyzer" then goto continue end
if server == "zls" then vim.g.zig_fmt_autosave = 0 end

::setup::
lspconfig[server].setup(opts)
Expand Down
2 changes: 1 addition & 1 deletion lua/nxvim/lsp/plugins/null-ls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ null_ls.register({
null_ls.setup({
debug = false,
sources = {
-- requires prettierd `pnpm i -g @fsouza/prettierd`
-- requires prettierd `bun i -g @fsouza/prettierd`
fmt.prettierd.with({
filetypes = {
"markdown",
Expand Down

0 comments on commit 11549b0

Please sign in to comment.