Compare commits
12 changed files with 81 additions and 125 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -12,9 +12,3 @@ package-lock.json
|
|||
|
||||
# stt model
|
||||
ggml-*.bin
|
||||
|
||||
# xdg config, only useful for test runs
|
||||
mimeapps.list
|
||||
|
||||
# htmlhint config, not a part of nvim config
|
||||
.htmlhintrc
|
||||
|
|
|
|||
5
makefile
5
makefile
|
|
@ -49,11 +49,8 @@ remove_cfg:
|
|||
rm $(CONFIG_FILES_FILE); \
|
||||
fi
|
||||
|
||||
update:
|
||||
@ndzu --headless '+Lazy! update' '+Lazy! sync' '+MasonToolsUpdateSync' +qa
|
||||
|
||||
# PACMAN_DEPS: deno tree-sitter-cli nix luarocks jdk21-openjdk
|
||||
# CARGO_BINS: nu nu_plugin_polars
|
||||
install: install_bin install_cfg update
|
||||
install: install_bin install_cfg
|
||||
|
||||
remove: remove_bin remove_cfg
|
||||
|
|
|
|||
|
|
@ -49,9 +49,6 @@ keymap(vm, "p", '"_dP', opts)
|
|||
keymap(nm, "s", "<Nop>", opts)
|
||||
keymap(nm, "sw", ":lua require('dzu.macro').toggle_whitespace_helpers()<CR>", opts)
|
||||
|
||||
-- toggle line wrapping
|
||||
keymap(nm, '<leader>w', ":lua require('dzu.macro').toggle_wrapping()<CR>", opts)
|
||||
|
||||
-- open file browser
|
||||
keymap(nm, '<leader>a', ':NvimTreeToggle<CR>', opts) -- open file explorer in the current folder, shirnk it a bit, and move to the left-most
|
||||
|
||||
|
|
|
|||
|
|
@ -17,13 +17,6 @@ return {
|
|||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
format = {
|
||||
enable = true,
|
||||
defaultConfig = {
|
||||
indent_style = "space",
|
||||
indent_size = "4",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,38 +14,30 @@ require("mason").setup(settings)
|
|||
|
||||
local servers = {
|
||||
{ "rust_analyzer", "rust_analyzer" },
|
||||
{ "pyright", "pyright" },
|
||||
{ "pyright", "pyright", },
|
||||
{ "ts_ls", nil },
|
||||
{ "biome", nil },
|
||||
{ "clangd", "clangd" },
|
||||
{ "clangd", nil },
|
||||
{ "lua_ls", "lua_ls" },
|
||||
-- { "hls", "hls" },
|
||||
{ "nil_ls", nil },
|
||||
{ "tinymist", "tinymist" },
|
||||
{ "jdtls", nil },
|
||||
-- { "nushell", nil }, -- TODO what IS the lspconfig name?
|
||||
{ "html", nil },
|
||||
{ "dockerls", nil },
|
||||
}
|
||||
local ensure_installed = {}
|
||||
local i = 1
|
||||
local lspconfig_servers = {}
|
||||
for _, s in pairs(servers) do
|
||||
local s0 = s[1]
|
||||
if s0 ~= nil then
|
||||
table.insert(ensure_installed, i, s0)
|
||||
i = i + 1
|
||||
table.insert(lspconfig_servers, s0)
|
||||
vim.lsp.enable(s0, true)
|
||||
end
|
||||
end
|
||||
for tool, _ in pairs(ADDITIONAL_MASON_TOOLS) do
|
||||
table.insert(ensure_installed, i, tool)
|
||||
i = i + 1
|
||||
end
|
||||
|
||||
require("mason-tool-installer").setup({
|
||||
ensure_installed = ensure_installed,
|
||||
auto_update = true,
|
||||
run_on_start = true,
|
||||
})
|
||||
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = lspconfig_servers,
|
||||
automatic_enable = true,
|
||||
automatic_installation = true,
|
||||
})
|
||||
|
|
@ -58,6 +50,7 @@ for _, s in pairs(servers) do
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
local is_ok, handlers = pcall(require, "dzu.lsp.handlers")
|
||||
if not is_ok then
|
||||
vim.notify("failed to initialize LSP handlers")
|
||||
|
|
|
|||
|
|
@ -14,12 +14,6 @@ function M.toggle_whitespace_helpers()
|
|||
end
|
||||
end
|
||||
|
||||
-- add wrapping toggle
|
||||
function M.toggle_wrapping()
|
||||
local wrap = vim.opt.wrap._value
|
||||
vim.opt.wrap = not wrap
|
||||
end
|
||||
|
||||
-- limiting line must be disable in readonly windows
|
||||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
callback = function(event_data)
|
||||
|
|
|
|||
|
|
@ -16,8 +16,13 @@ local options = {
|
|||
},
|
||||
-- visualbell = true, -- FLASHES THE SCREEN
|
||||
-- binary - check out binary file viewing and editing
|
||||
linebreak = false,
|
||||
wrap = true,
|
||||
linebreak = true,
|
||||
breakat = " ^I!@*-+;:,./?", -- where line breaks are allowed
|
||||
-- breakindent = true, -- line breaks continue where the line starts
|
||||
breakindentopt = {
|
||||
'shift:0', -- indent by no char
|
||||
'sbr', -- show line break symbol
|
||||
},
|
||||
showbreak = '↪ ', -- line break symbol itself
|
||||
cdhome = false, -- do not cd to home on :cd (won't work?)
|
||||
cedit = '', -- no kinding to open CL window (?)
|
||||
|
|
@ -37,11 +42,15 @@ local options = {
|
|||
errorbells = true, -- sound on errors
|
||||
exrc = true, -- execute possible local config
|
||||
fillchars = 'diff:<',
|
||||
foldlevelstart = 0, -- at start, close all folds...
|
||||
foldminlines = 50, -- but only fold really large things...
|
||||
foldmethod = 'indent', -- and identify them by indent
|
||||
-- look into lang* (langmenu)
|
||||
lazyredraw = true, -- might be a bad idea, IDK
|
||||
mouse = '',
|
||||
mousehide = true,
|
||||
mousescroll = 'ver:0,hor:0',
|
||||
mouse = 'nvi', -- enable mouse at insert and visual
|
||||
mousehide = true, -- hide mouse when something is being typed
|
||||
-- mousefocus = true, -- focus on window where mouse is
|
||||
mousescroll = 'ver:2,hor:3',
|
||||
-- mouses = 'n:arrow,v:crosshair,i:beam', -- how mouse looks like in different modes
|
||||
number = true, -- print numbers at the start
|
||||
ruler = true, -- show row&column
|
||||
|
|
|
|||
|
|
@ -89,11 +89,7 @@ local function config()
|
|||
DiffviewOpen = {},
|
||||
DiffviewFileHistory = {},
|
||||
},
|
||||
hooks = {
|
||||
diff_buf_win_enter = function()
|
||||
vim.opt_local.foldenable = false
|
||||
end,
|
||||
}, -- See |diffview-config-hooks|
|
||||
hooks = {}, -- See |diffview-config-hooks|
|
||||
keymaps = {
|
||||
disable_defaults = false, -- Disable the default keymaps
|
||||
view = {
|
||||
|
|
|
|||
|
|
@ -6,8 +6,9 @@ local function config()
|
|||
end
|
||||
|
||||
-- js/ts fomatters
|
||||
local web_fmt = { "biome" }
|
||||
local web_fmt = { "biome" };
|
||||
local fomatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
python = { "black" },
|
||||
javascript = web_fmt,
|
||||
javascriptreact = web_fmt,
|
||||
|
|
|
|||
|
|
@ -1,10 +1,20 @@
|
|||
local function config()
|
||||
local is_ok, _ = pcall(require, 'dzu.lsp')
|
||||
if not is_ok then
|
||||
vim.notify("failed to setup lsp")
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
"mason-org/mason-lspconfig.nvim",
|
||||
opts = {},
|
||||
dependencies = {
|
||||
"mason-org/mason.nvim",
|
||||
"neovim/nvim-lspconfig",
|
||||
-- lsp completions
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
},
|
||||
config = config,
|
||||
lazy = false,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,29 +0,0 @@
|
|||
local function config()
|
||||
local is_ok, _ = pcall(require, "mason-tool-installer")
|
||||
if not is_ok then
|
||||
vim.notify("Failed to setup mason tools")
|
||||
return
|
||||
end
|
||||
|
||||
local is_ok, _ = pcall(require, "dzu.lsp")
|
||||
if not is_ok then
|
||||
vim.notify("failed to setup lsp")
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
dependencies = {
|
||||
"mason-org/mason-lspconfig.nvim",
|
||||
},
|
||||
config = config,
|
||||
lazy = false,
|
||||
opts = {
|
||||
integrations = {
|
||||
["mason-lspconfig"] = true,
|
||||
["mason-null-ls"] = false,
|
||||
["mason-nvim-dap"] = false,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1,48 +1,49 @@
|
|||
local function config()
|
||||
local is_ok, tree_sitter = pcall(require, "nvim-treesitter")
|
||||
local is_ok, configs = pcall(require, "nvim-treesitter.configs")
|
||||
if not is_ok then
|
||||
vim.notify("couldn't find tree sitter")
|
||||
vim.notify("couldn't find tree sitter config")
|
||||
return
|
||||
end
|
||||
|
||||
local langs = {
|
||||
"bash",
|
||||
"c",
|
||||
"comment",
|
||||
"cpp",
|
||||
"csv",
|
||||
"djot",
|
||||
"dockerfile",
|
||||
"fish",
|
||||
"gitignore",
|
||||
"diff",
|
||||
"git_rebase",
|
||||
"gitcommit",
|
||||
"haskell",
|
||||
"html",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"tsx",
|
||||
"json",
|
||||
"latex",
|
||||
"lua",
|
||||
"luadoc",
|
||||
"make",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"rust",
|
||||
"sql",
|
||||
"toml",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"xml",
|
||||
"nu",
|
||||
"java",
|
||||
}
|
||||
local opts = {
|
||||
ensure_installed = langs,
|
||||
sync_install = true,
|
||||
local config_opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"c",
|
||||
"comment",
|
||||
"cpp",
|
||||
"csv",
|
||||
-- "cuda", -- not yet; might enable in the future
|
||||
"djot",
|
||||
"dockerfile", -- oh yeah. I should probably figure docker out...
|
||||
"fish",
|
||||
"gitignore",
|
||||
"diff",
|
||||
"git_rebase",
|
||||
"gitcommit",
|
||||
"haskell",
|
||||
"html",
|
||||
"javascript",
|
||||
"typescript",
|
||||
-- "jsx",
|
||||
"tsx",
|
||||
"json",
|
||||
"latex",
|
||||
"lua",
|
||||
"luadoc",
|
||||
"make",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"rust",
|
||||
"sql",
|
||||
"toml",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"xml",
|
||||
"nu",
|
||||
"java",
|
||||
},
|
||||
sync_install = false,
|
||||
ignore_install = {}, -- List of parsers to ignore installing
|
||||
highlight = {
|
||||
enable = true, -- false will disable the whole extension
|
||||
|
|
@ -52,7 +53,7 @@ local function config()
|
|||
},
|
||||
indent = { enable = true, disable = {} },
|
||||
}
|
||||
tree_sitter.setup(opts)
|
||||
configs.setup(config_opts)
|
||||
|
||||
vim.cmd.TSUpdate()
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue