refactor: massive refactor using flake-parts; use typos-cli and
keep-sorted
This commit is contained in:
@@ -29,6 +29,8 @@ lib.my.makeHomeProgramConfig {
|
||||
gcc # treesitter
|
||||
|
||||
ripgrep # telescope
|
||||
|
||||
typos-lsp
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -37,7 +37,7 @@ vim.g.autoread = true
|
||||
|
||||
vim.g.loaded_ruby_provider = 0
|
||||
|
||||
-- Hightlight on yank
|
||||
-- Highlight on yank
|
||||
local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true })
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
callback = function()
|
||||
@@ -55,12 +55,12 @@ vim.cmd([[
|
||||
\ endif
|
||||
]])
|
||||
|
||||
-- Automaticly switch input method
|
||||
-- Automatically switch input method
|
||||
Last_input_method = 1
|
||||
vim.api.nvim_create_augroup("AutoInputMethod", {})
|
||||
vim.api.nvim_create_autocmd("InsertLeave", {
|
||||
pattern = "*",
|
||||
desc = "Automaticly switch input method",
|
||||
desc = "Automatically switch input method",
|
||||
callback = function()
|
||||
Last_input_method = require("core.globals").switch_input_method(1)
|
||||
end,
|
||||
@@ -68,7 +68,7 @@ vim.api.nvim_create_autocmd("InsertLeave", {
|
||||
})
|
||||
vim.api.nvim_create_autocmd("CmdlineLeave", {
|
||||
pattern = "*",
|
||||
desc = "Automaticly switch input method",
|
||||
desc = "Automatically switch input method",
|
||||
callback = function()
|
||||
require("core.globals").switch_input_method(1)
|
||||
end,
|
||||
@@ -76,7 +76,7 @@ vim.api.nvim_create_autocmd("CmdlineLeave", {
|
||||
})
|
||||
vim.api.nvim_create_autocmd("InsertEnter", {
|
||||
pattern = "*",
|
||||
desc = "Automaticly switch input method",
|
||||
desc = "Automatically switch input method",
|
||||
callback = function()
|
||||
require("core.globals").switch_input_method(Last_input_method)
|
||||
end,
|
||||
|
||||
@@ -42,7 +42,16 @@ local servers = {
|
||||
command = { "nixfmt" },
|
||||
},
|
||||
nixpkgs = {
|
||||
expr = "import <nixpkgs> { }",
|
||||
expr = [[
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
nodeName = lock.nodes.root.inputs.nixpkgs;
|
||||
in
|
||||
import (fetchTarball {
|
||||
url = lock.nodes.${nodeName}.locked.url or "https://github.com/NixOS/nixpkgs/archive/${lock.nodes.${nodeName}.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.${nodeName}.locked.narHash;
|
||||
}) { }
|
||||
]],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -54,14 +63,17 @@ local servers = {
|
||||
qmlls = {
|
||||
cmd = { "qmlls", "-E" },
|
||||
},
|
||||
pyright = {},
|
||||
gopls = {},
|
||||
-- keep-sorted start
|
||||
clangd = {},
|
||||
ts_ls = {},
|
||||
jsonls = {},
|
||||
cssls = {},
|
||||
gopls = {},
|
||||
html = {},
|
||||
java_language_server = {},
|
||||
jsonls = {},
|
||||
pyright = {},
|
||||
ts_ls = {},
|
||||
typos_lsp = {},
|
||||
-- keep-sorted end
|
||||
}
|
||||
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
Reference in New Issue
Block a user