Compare commits
4 commits
ef5ec33e4f
...
4f8865c8ac
Author | SHA1 | Date | |
---|---|---|---|
4f8865c8ac | |||
8b8a7cf04b | |||
93f6d76c76 | |||
aa228521fe |
5 changed files with 45 additions and 29 deletions
14
flake.lock
14
flake.lock
|
@ -29,11 +29,11 @@
|
||||||
"zig": "zig"
|
"zig": "zig"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730688195,
|
"lastModified": 1730776162,
|
||||||
"narHash": "sha256-wXK1/gOImxv0vHpUc9qgno1AY8c64j17/UFIiT7zH1g=",
|
"narHash": "sha256-ODmmTWz3jqaPmJ1UiJgHD3oy90BTEd871GZHyT5Xn9M=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "737dc0896dc266a98c889e122b5c900636e589c9",
|
"rev": "f9199a46118f173ac7a005130f871fdf050f94d1",
|
||||||
"revCount": 7874,
|
"revCount": 7881,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://git@github.com/ghostty-org/ghostty"
|
"url": "ssh://git@github.com/ghostty-org/ghostty"
|
||||||
},
|
},
|
||||||
|
@ -95,11 +95,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730327045,
|
"lastModified": 1730741070,
|
||||||
"narHash": "sha256-xKel5kd1AbExymxoIfQ7pgcX6hjw9jCgbiBjiUfSVJ8=",
|
"narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "080166c15633801df010977d9d7474b4a6c549d7",
|
"rev": "d063c1dd113c91ab27959ba540c0d9753409edf3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -10,8 +10,10 @@
|
||||||
withRuby = false;
|
withRuby = false;
|
||||||
|
|
||||||
extraLuaConfig = lib.fileContents ./init.lua;
|
extraLuaConfig = lib.fileContents ./init.lua;
|
||||||
|
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
black
|
black
|
||||||
|
cue
|
||||||
go
|
go
|
||||||
gopls
|
gopls
|
||||||
gotools
|
gotools
|
||||||
|
|
|
@ -8,18 +8,32 @@ vim.opt.laststatus = 0
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
vim.opt.ruler = true
|
vim.opt.ruler = true
|
||||||
vim.opt.rulerformat = "" -- FIXME: fancify!
|
|
||||||
vim.opt.rulerformat = "%36(%5l,%-6(%c%V%) %t%)%*"
|
|
||||||
vim.opt.syntax = "on"
|
vim.opt.syntax = "on"
|
||||||
vim.opt.termguicolors = true
|
vim.opt.termguicolors = true
|
||||||
|
|
||||||
|
-- Ruler
|
||||||
|
function GetIndicators()
|
||||||
|
local bufnr = vim.api.nvim_get_current_buf()
|
||||||
|
local counts = vim.diagnostic.count(bufnr)
|
||||||
|
local errors = counts[vim.diagnostic.severity.ERROR] or 0
|
||||||
|
local warnings = counts[vim.diagnostic.severity.WARN] or 0
|
||||||
|
local warn_string = warnings > 0 and "%#DiagnosticWarn# " .. warnings .. " " or " "
|
||||||
|
local error_string = errors > 0 and "%#DiagnosticError# " .. errors .. " " or " "
|
||||||
|
return warn_string .. error_string
|
||||||
|
end
|
||||||
|
function GetRulerIcon()
|
||||||
|
local icon = vim.bo.modified and "" or ""
|
||||||
|
return "%#CustomRulerSeparator#%#CustomRulerIcon#" .. icon .. " "
|
||||||
|
end
|
||||||
|
vim.opt.rulerformat = "%40(%=%{%v:lua.GetIndicators()%}%#Label#│ %t %)"
|
||||||
|
|
||||||
-- Search
|
-- Search
|
||||||
vim.opt.ignorecase = true
|
vim.opt.ignorecase = true
|
||||||
vim.opt.smartcase = true
|
vim.opt.smartcase = true
|
||||||
|
|
||||||
-- Tab completion
|
-- Tab completion
|
||||||
-- vim.opt.wildmode="list:longest,full"
|
-- vim.opt.wildmode="list:longest,full"
|
||||||
vim.opt.wildignore="*.swp,*.o,*.so,*.exe,*.dll"
|
vim.opt.wildignore = '*.swp,*.o,*.so,*.exe,*.dll'
|
||||||
|
|
||||||
-- Whitespaces
|
-- Whitespaces
|
||||||
vim.opt.breakindent = true
|
vim.opt.breakindent = true
|
||||||
|
@ -32,14 +46,14 @@ vim.opt.smartindent = true
|
||||||
vim.opt.tabstop = 2
|
vim.opt.tabstop = 2
|
||||||
vim.opt.wrap = false
|
vim.opt.wrap = false
|
||||||
vim.opt.list = true
|
vim.opt.list = true
|
||||||
vim.opt.listchars="tab:»·,trail:·"
|
im.opt.listchars = "tab:»·,trail:·"
|
||||||
|
|
||||||
-- Folds
|
-- Folds
|
||||||
vim.opt.foldenable = false
|
vim.opt.foldenable = false
|
||||||
vim.opt.foldtext = "v:lua.vim.treesitter.foldtext()"
|
vim.opt.foldtext = "v:lua.vim.treesitter.foldtext()"
|
||||||
vim.opt.foldmethod = "expr"
|
vim.opt.foldmethod = "expr"
|
||||||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||||
|
qqq
|
||||||
--
|
--
|
||||||
|
|
||||||
vim.o.autochdir = true
|
vim.o.autochdir = true
|
||||||
|
@ -62,7 +76,7 @@ vim.opt.grepformat = vim.opt.grepformat ^ { "%f:%l:%c:%m" }
|
||||||
|
|
||||||
vim.fn.sign_define(
|
vim.fn.sign_define(
|
||||||
"DiagnosticSignError",
|
"DiagnosticSignError",
|
||||||
{ text = "", hl = "DiagnosticSignError", texthl = "DiagnosticSignError", culhl = "DiagnosticSignErrorLine" }
|
{ text = "", hl = "DiagnosticSignError", texthl = "DiagnosticSignError", culhl = "DiagnosticSignErrorLine" }
|
||||||
)
|
)
|
||||||
vim.fn.sign_define(
|
vim.fn.sign_define(
|
||||||
"DiagnosticSignWarn",
|
"DiagnosticSignWarn",
|
||||||
|
@ -70,7 +84,7 @@ vim.fn.sign_define(
|
||||||
)
|
)
|
||||||
vim.fn.sign_define(
|
vim.fn.sign_define(
|
||||||
"DiagnosticSignInfo",
|
"DiagnosticSignInfo",
|
||||||
{ text = "", hl = "DiagnosticSignInfo", texthl = "DiagnosticSignInfo", culhl = "DiagnosticSignInfoLine" }
|
{ text = "", hl = "DiagnosticSignInfo", texthl = "DiagnosticSignInfo", culhl = "DiagnosticSignInfoLine" }
|
||||||
)
|
)
|
||||||
vim.fn.sign_define(
|
vim.fn.sign_define(
|
||||||
"DiagnosticSignHint",
|
"DiagnosticSignHint",
|
||||||
|
|
|
@ -35,12 +35,13 @@ vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
vim.keymap.set("n", "<space>r", vim.lsp.buf.rename, opts("Rename Symbol"))
|
vim.keymap.set("n", "<space>r", vim.lsp.buf.rename, opts("Rename Symbol"))
|
||||||
vim.keymap.set({ "n", "v" }, "<space>a", vim.lsp.buf.code_action, opts("Code Action"))
|
vim.keymap.set({ "n", "v" }, "<space>a", vim.lsp.buf.code_action, opts("Code Action"))
|
||||||
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts("Buffer References"))
|
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts("Buffer References"))
|
||||||
vim.keymap.set("n", "<localleader>f", function()
|
vim.keymap.set("n", "<space>cf", function()
|
||||||
vim.lsp.buf.format({ async = true })
|
vim.lsp.buf.format({ async = true })
|
||||||
end, opts("Format Buffer"))
|
end, opts("Format Buffer"))
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local configs = require('lspconfig.configs')
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
require('mini.extra').setup()
|
require('mini.extra').setup()
|
||||||
require('mini.icons').setup()
|
require('mini.icons').setup()
|
||||||
require('mini.jump').setup()
|
require('mini.jump').setup()
|
||||||
-- require('mini.pairs').setup()
|
|
||||||
-- require('mini.statusline').setup()
|
|
||||||
require('mini.surround').setup()
|
require('mini.surround').setup()
|
||||||
require('mini.splitjoin').setup()
|
require('mini.splitjoin').setup()
|
||||||
|
|
||||||
|
@ -54,8 +52,9 @@
|
||||||
MiniPick.registry.files_root = function(local_opts)
|
MiniPick.registry.files_root = function(local_opts)
|
||||||
local root_patterns = { ".jj", ".git" }
|
local root_patterns = { ".jj", ".git" }
|
||||||
local root_dir = vim.fs.dirname(vim.fs.find(root_patterns, { upward = true })[1])
|
local root_dir = vim.fs.dirname(vim.fs.find(root_patterns, { upward = true })[1])
|
||||||
local opts = { source = { cwd = root_dir, tool = "rg" } }
|
local opts = { source = { cwd = root_dir, tool = "ripgrep"} }
|
||||||
local_opts.cwd = root_dir
|
local_opts.cwd = root_dir
|
||||||
|
local_opts.tool = "rg"
|
||||||
return MiniPick.builtin.files(local_opts, opts)
|
return MiniPick.builtin.files(local_opts, opts)
|
||||||
end
|
end
|
||||||
MiniPick.registry.grep_live_root = function(local_opts)
|
MiniPick.registry.grep_live_root = function(local_opts)
|
||||||
|
|
Loading…
Reference in a new issue