emacs, neovim & fish

This commit is contained in:
speckitor
2026-06-11 19:41:26 +07:00
parent 216c9fdec4
commit 6d3175f2cf
11 changed files with 157 additions and 172 deletions
+9
View File
@@ -0,0 +1,9 @@
if status is-interactive
set fish_greeting
function fish_prompt
printf "%s%s%s 󰘧 " (set_color $fish_color_cwd) (prompt_pwd) (set_color --reset)
end
end
+3
View File
@@ -0,0 +1,3 @@
vim.opt.expandtab = true
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
+1
View File
@@ -2,3 +2,4 @@ require("autocmd")
require("config")
require("keymap")
require("plugins")
require("lsp")
+8 -12
View File
@@ -1,16 +1,12 @@
vim.opt.completeopt = { "menuone", "noselect", "popup" }
vim.api.nvim_create_autocmd("LspAttach", {
callback = function(ev)
local client = vim.lsp.get_client_by_id(ev.data.client_id)
if client:supports_method("textDocument/completion") then
vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = false })
end
end,
})
vim.api.nvim_create_autocmd('TextYankPost', {
vim.api.nvim_create_autocmd("TextYankPost", {
callback = function()
vim.highlight.on_yank({ timeout = 170 })
end,
})
vim.api.nvim_create_autocmd("FileType", {
pattern = "c3",
callback = function()
pcall(function() vim.treesitter.start(0, "c3") end)
end,
})
+1 -3
View File
@@ -1,5 +1,3 @@
vim.cmd.colorscheme "wildcharm"
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.cursorline = true
@@ -17,7 +15,7 @@ vim.opt.clipboard = "unnamedplus"
vim.opt.signcolumn = "yes"
vim.opt.langmap="ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKLMNOPQRSTUVWXYZ,фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz"
vim.opt.list = true
vim.opt.listchars = "tab:>-,space:·"
vim.opt.listchars = "tab: |"
vim.g.mapleader = " "
vim.g.maplocalleader = " "
+7 -11
View File
@@ -3,18 +3,14 @@ vim.api.nvim_set_keymap("n", "<leader>f", ":Pick files<CR>", {})
vim.api.nvim_set_keymap("n", "<leader>b", ":Pick buffers<CR>", {})
vim.api.nvim_set_keymap("n", "<leader>g", ":Pick grep_live<CR>", {})
vim.keymap.set("i", "<c-enter>", function()
vim.lsp.completion.get()
end)
-- I love go
vim.api.nvim_set_keymap("n", "<A-e>n", "iif err != nil {\n}<ESC>O", {})
vim.api.nvim_set_keymap("i", "<A-e>n", "if err != nil {\n}<ESC>O", {})
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float,
{ desc = 'Show error/diagnostic messages' })
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev,
{ desc = 'Go to previous diagnostic' })
vim.keymap.set('n', ']d', vim.diagnostic.goto_next,
{ desc = 'Go to next diagnostic' })
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist,
{ desc = 'Open diagnostics list' })
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Show error/diagnostic messages' })
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic' })
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnostic' })
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })
vim.api.nvim_create_autocmd('LspAttach', {
desc = 'LSP actions',
+15
View File
@@ -0,0 +1,15 @@
vim.lsp.enable("clangd")
vim.lsp.config("clangd", {
cmd = { "clangd", "--header-insertion=never"}
})
vim.lsp.enable("gopls")
vim.lsp.enable("zls")
vim.lsp.enable("c3lsp")
vim.lsp.config("c3lsp", {
cmd = {
"c3lsp",
"--diagnostics-delay", "1000",
}
})
+31 -5
View File
@@ -1,13 +1,39 @@
vim.pack.add({
"https://github.com/nvim-mini/mini.nvim",
"https://github.com/neovim/nvim-lspconfig",
"https://github.com/nvim-mini/mini.nvim",
"https://github.com/neovim/nvim-lspconfig",
"https://github.com/rose-pine/neovim.git",
{ src = "https://github.com/saghen/blink.cmp.git", version = vim.version.range("^1") },
"https://github.com/nvim-treesitter/nvim-treesitter.git",
})
require("mini.surround").setup()
require("mini.files").setup()
require("mini.pick").setup()
vim.lsp.enable("clangd")
vim.lsp.config("clangd", {
cmd = { "clangd", "--header-insertion=never"}
require("rose-pine").setup()
vim.cmd("colorscheme rose-pine")
require('blink.cmp').setup({
keymap = { preset = 'default' },
signature = { enabled = true },
appearance = {
use_nvim_cmp_as_default = true,
nerd_font_variant = 'mono'
},
completion = {
documentation = { auto_show = true, }
},
sources = {
default = { 'lsp', 'path', 'snippets', 'buffer' },
},
})
require('nvim-treesitter').setup({
ensure_installed = {
"lua", "c", "zig", "python", "rust", "c3"
},
highlight = { enable = true }
})
+29
View File
@@ -0,0 +1,29 @@
{
"plugins": {
"blink.cmp": {
"rev": "78336bc89ee5365633bcf754d93df01678b5c08f",
"src": "https://github.com/saghen/blink.cmp.git",
"version": "1.0.0 - 2.0.0"
},
"mini.nvim": {
"rev": "15abccbe23525ee0502d2efe620c77db00bfb93c",
"src": "https://github.com/nvim-mini/mini.nvim"
},
"neovim": {
"rev": "ff483051a47e27d84bdef47703538df1ed9f4a47",
"src": "https://github.com/rose-pine/neovim.git"
},
"nvim-c3": {
"rev": "751ec7188fa2e92518cdcb0186e657aff7202a90",
"src": "https://github.com/ManuLinares/nvim-c3.git"
},
"nvim-lspconfig": {
"rev": "9573948c38bfabeec353ae7dd7d3ffec4c506a6b",
"src": "https://github.com/neovim/nvim-lspconfig"
},
"nvim-treesitter": {
"rev": "4916d6592ede8c07973490d9322f187e07dfefac",
"src": "https://github.com/nvim-treesitter/nvim-treesitter.git"
}
}
}