misc updates.
This commit is contained in:
@@ -1,13 +1,26 @@
|
|||||||
local cmp = require('cmp')
|
local cmp = require('cmp')
|
||||||
local snippy = require('snippy')
|
local snippy = require('snippy')
|
||||||
|
|
||||||
|
-- Neovim shifts wide floating menus back onto the screen. nvim-cmp otherwise
|
||||||
|
-- anchors docs to the requested column, which can overlap the shifted menu.
|
||||||
|
local entries_view = require('cmp.view.custom_entries_view')
|
||||||
|
entries_view.info = function(self)
|
||||||
|
local info = self.entries_win:info()
|
||||||
|
info.col = math.max(0, math.min(info.col, vim.o.columns - info.width))
|
||||||
|
return info
|
||||||
|
end
|
||||||
|
|
||||||
vim.opt.completeopt = { 'menuone', 'noselect' }
|
vim.opt.completeopt = { 'menuone', 'noselect' }
|
||||||
vim.opt.shortmess:append('c')
|
vim.opt.shortmess:append('c')
|
||||||
|
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
window = {
|
window = {
|
||||||
completion = cmp.config.window.bordered(),
|
completion = cmp.config.window.bordered({ border = 'rounded' }),
|
||||||
documentation = cmp.config.window.bordered(),
|
documentation = cmp.config.window.bordered({
|
||||||
|
border = 'rounded',
|
||||||
|
-- Leave a column between the menu and docs, on either side.
|
||||||
|
col_offset = 1,
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
snippet = {
|
snippet = {
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ local map = vim.keymap.set
|
|||||||
|
|
||||||
map('n', '<Space>', '<Nop>', { silent = true })
|
map('n', '<Space>', '<Nop>', { silent = true })
|
||||||
map('i', ',m', '<Esc>', { silent = true })
|
map('i', ',m', '<Esc>', { silent = true })
|
||||||
|
-- Preserve a pending comma from the ,m mapping when leaving insert mode.
|
||||||
|
map('i', '<C-c>', '<Esc>', { silent = true })
|
||||||
|
|
||||||
for _, mode in ipairs({ 'n', 'i', 'v', 's', 'x', 'c', 'o', 't' }) do
|
for _, mode in ipairs({ 'n', 'i', 'v', 's', 'x', 'c', 'o', 't' }) do
|
||||||
map(mode, '<C-g>', '<Esc>', { silent = true })
|
map(mode, '<C-g>', '<Esc>', { silent = true })
|
||||||
|
|||||||
@@ -5,6 +5,12 @@ for _, server in ipairs({ 'ts_ls', 'basedpyright', 'gopls', 'zls', 'clangd', 'ru
|
|||||||
vim.lsp.enable(server)
|
vim.lsp.enable(server)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Bare-metal cross-compile: clangd won't execute an unlisted driver,
|
||||||
|
-- so allowlist the Arm one to get its newlib/ARM system include paths.
|
||||||
|
vim.lsp.config('clangd', {
|
||||||
|
cmd = { 'clangd', '--query-driver=**/arm-none-eabi-*' },
|
||||||
|
})
|
||||||
|
|
||||||
vim.lsp.config('lua_ls', {
|
vim.lsp.config('lua_ls', {
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_init = function(client)
|
on_init = function(client)
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
home.file.".config/herdr/config.toml" = {
|
home.file.".config/herdr/config.toml" = {
|
||||||
text = ''
|
text = ''
|
||||||
|
onboarding = false
|
||||||
|
|
||||||
[keys]
|
[keys]
|
||||||
prefix = "ctrl+a"
|
prefix = "ctrl+a"
|
||||||
|
|
||||||
|
|||||||
@@ -122,6 +122,11 @@ in {
|
|||||||
hostname = "40.160.241.66";
|
hostname = "40.160.241.66";
|
||||||
forwardAgent = true;
|
forwardAgent = true;
|
||||||
};
|
};
|
||||||
|
handmade-runner = {
|
||||||
|
user = "jmug";
|
||||||
|
hostname = "40.160.151.45";
|
||||||
|
forwardAgent = true;
|
||||||
|
};
|
||||||
racknerd = {
|
racknerd = {
|
||||||
user = "jmug";
|
user = "jmug";
|
||||||
hostname = "155.94.155.137";
|
hostname = "155.94.155.137";
|
||||||
@@ -158,6 +163,8 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
initContent = ''
|
initContent = ''
|
||||||
|
eval "$(mise activate zsh)"
|
||||||
|
|
||||||
export PATH=$PATH:$HOME/bin
|
export PATH=$PATH:$HOME/bin
|
||||||
export PATH=$PATH:$HOME/.opencode/bin
|
export PATH=$PATH:$HOME/.opencode/bin
|
||||||
export PATH=$PATH:$HOME/.local/bin
|
export PATH=$PATH:$HOME/.local/bin
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
../../home-modules/direnv.nix
|
../../home-modules/direnv.nix
|
||||||
../../home-modules/zsh.nix
|
../../home-modules/zsh.nix
|
||||||
../../home-modules/tmux.nix
|
../../home-modules/tmux.nix
|
||||||
|
../../home-modules/herdr.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nvim = {
|
nvim = {
|
||||||
@@ -23,6 +24,7 @@
|
|||||||
home = {
|
home = {
|
||||||
username = "jmug";
|
username = "jmug";
|
||||||
homeDirectory = "/home/jmug";
|
homeDirectory = "/home/jmug";
|
||||||
|
sessionPath = [ "$HOME/.local/bin" ];
|
||||||
|
|
||||||
stateVersion = "25.05";
|
stateVersion = "25.05";
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user