Move nvim config to shared
This commit is contained in:
@@ -6,12 +6,7 @@ local plugins = {
|
||||
|
||||
'kylechui/nvim-surround',
|
||||
|
||||
{
|
||||
'ibhagwan/fzf-lua',
|
||||
config = function()
|
||||
require('fzf-lua').setup({'skim'})
|
||||
end
|
||||
},
|
||||
|
||||
'neovim/nvim-lspconfig',
|
||||
'hrsh7th/nvim-cmp',
|
||||
@@ -21,9 +16,9 @@ local plugins = {
|
||||
'rust-lang/rust.vim',
|
||||
|
||||
{
|
||||
'windwp/nvim-autopairs',
|
||||
event = 'InsertEnter',
|
||||
opts={},
|
||||
'windwp/nvim-autopairs',
|
||||
event = 'InsertEnter',
|
||||
opts={},
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
@@ -35,6 +35,4 @@ vim.opt.completeopt=menuone,noselect
|
||||
|
||||
vim.opt.undofile=true
|
||||
|
||||
|
||||
vim.g['loaded_perl_provider']=0
|
||||
vim.g['python3_host_prog']='/usr/bin/python'
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
homeDirectory = "/home/eesim";
|
||||
};
|
||||
|
||||
home.file.".config/nvim".source = ./dotfiles/nvim;
|
||||
home.file.".config/nvim".source = ../shared/dotfiles/nvim;
|
||||
home.file.".tmux.conf".source = ../shared/dotfiles/tmux;
|
||||
home.file.".config/waybar".source = ./dotfiles/waybar;
|
||||
home.file.".config/fish/config.fish".source = ./dotfiles/fish/config.fish;
|
||||
|
||||
|
||||
@@ -6,12 +6,7 @@ local plugins = {
|
||||
|
||||
'kylechui/nvim-surround',
|
||||
|
||||
{
|
||||
'ibhagwan/fzf-lua',
|
||||
config = function()
|
||||
require('fzf-lua').setup({'skim'})
|
||||
end
|
||||
},
|
||||
|
||||
'neovim/nvim-lspconfig',
|
||||
'hrsh7th/nvim-cmp',
|
||||
@@ -20,15 +15,15 @@ local plugins = {
|
||||
'L3MON4D3/LuaSnip',
|
||||
|
||||
{
|
||||
'windwp/nvim-autopairs',
|
||||
event = 'InsertEnter',
|
||||
opts = {},
|
||||
'windwp/nvim-autopairs',
|
||||
event = 'InsertEnter',
|
||||
opts = {},
|
||||
},
|
||||
|
||||
{
|
||||
'kaarmu/typst.vim',
|
||||
ft = 'typst',
|
||||
lazy = false,
|
||||
'kaarmu/typst.vim',
|
||||
ft = 'typst',
|
||||
lazy = false,
|
||||
},
|
||||
|
||||
'jalvesaq/Nvim-R',
|
||||
|
||||
@@ -36,4 +36,3 @@ vim.opt.completeopt=menuone,noselect
|
||||
vim.opt.undofile=true
|
||||
|
||||
vim.g['loaded_perl_provider']=0
|
||||
vim.g['python3_host_prog']='/usr/bin/python3'
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
homeDirectory = "/home/eesim";
|
||||
};
|
||||
|
||||
home.file.".config/nvim".source = ./dotfiles/nvim;
|
||||
home.file.".config/nvim".source = ../shared/dotfiles/nvim;
|
||||
home.file.".config/waybar".source = ./dotfiles/waybar;
|
||||
home.file.".config/fish/config.fish".source = ./dotfiles/fish/config.fish;
|
||||
home.file.".config/alacritty/alacritty.toml".source = ./dotfiles/alacritty/alacritty.toml;
|
||||
|
||||
9
hosts/shared/dotfiles/nvim/init.lua
Normal file
9
hosts/shared/dotfiles/nvim/init.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
require('config/keymaps')
|
||||
require('config/settings')
|
||||
require('config/plugins')
|
||||
require('config/plugins/lualine')
|
||||
require('config/plugins/lspconfig')
|
||||
|
||||
local vimscriptpath = vim.fn.stdpath("config") .. "/lua/config/vimscript/"
|
||||
|
||||
vim.cmd('source' .. vimscriptpath .. 'init.vim')
|
||||
17
hosts/shared/dotfiles/nvim/lua/config/keymaps.lua
Normal file
17
hosts/shared/dotfiles/nvim/lua/config/keymaps.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
vim.g.mapleader=','
|
||||
vim.g.maplocalleader=','
|
||||
|
||||
vim.keymap.set('n', '<C-h>', '<C-w>h')
|
||||
vim.keymap.set('n', '<C-j>', '<C-w>j')
|
||||
vim.keymap.set('n', '<C-k>', '<C-w>k')
|
||||
vim.keymap.set('n', '<C-l>', '<C-w>l')
|
||||
|
||||
vim.keymap.set('n', '<leader>ff', ':FzfLua files<CR>')
|
||||
vim.keymap.set('n', '<leader>fb', ':FzfLua buffers<CR>')
|
||||
vim.keymap.set('n', '<leader>rg', ':FzfLua grep_project<CR>')
|
||||
|
||||
|
||||
|
||||
vim.keymap.set('i', '<S-Tab>', '<C-d>')
|
||||
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
|
||||
53
hosts/shared/dotfiles/nvim/lua/config/plugins/init.lua
Normal file
53
hosts/shared/dotfiles/nvim/lua/config/plugins/init.lua
Normal file
@@ -0,0 +1,53 @@
|
||||
local plugins = {
|
||||
'rebelot/kanagawa.nvim',
|
||||
|
||||
'nvim-lualine/lualine.nvim',
|
||||
'kyazdani42/nvim-web-devicons',
|
||||
|
||||
'kylechui/nvim-surround',
|
||||
|
||||
'ibhagwan/fzf-lua',
|
||||
|
||||
'neovim/nvim-lspconfig',
|
||||
'hrsh7th/nvim-cmp',
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-path',
|
||||
'L3MON4D3/LuaSnip',
|
||||
|
||||
{
|
||||
'windwp/nvim-autopairs',
|
||||
event = 'InsertEnter',
|
||||
opts = {},
|
||||
},
|
||||
|
||||
{
|
||||
'kaarmu/typst.vim',
|
||||
ft = 'typst',
|
||||
lazy = false,
|
||||
},
|
||||
|
||||
'jalvesaq/Nvim-R',
|
||||
|
||||
{
|
||||
'RaafatTurki/hex.nvim',
|
||||
config = function()
|
||||
require('hex').setup()
|
||||
end
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup(plugins, opts)
|
||||
67
hosts/shared/dotfiles/nvim/lua/config/plugins/lspconfig.lua
Normal file
67
hosts/shared/dotfiles/nvim/lua/config/plugins/lspconfig.lua
Normal file
@@ -0,0 +1,67 @@
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
capabilities.textDocument.completion.completionItem.snippetSupport = false;
|
||||
|
||||
local lspconfig = require('lspconfig')
|
||||
|
||||
lspconfig.rust_analyzer.setup {
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
cargo = {
|
||||
allFeatures = true,
|
||||
},
|
||||
imports = {
|
||||
group = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
completion = {
|
||||
postfix = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
lspconfig.omnisharp.setup {
|
||||
cmd = { "dotnet", "/usr/lib/omnisharp-roslyn/OmniSharp.dll"}
|
||||
}
|
||||
|
||||
local default_servers = {'pylsp', 'ccls', 'typst_lsp', 'r_language_server', 'lua_ls', 'nil_ls'}
|
||||
|
||||
for _, lsp in ipairs(default_servers) do
|
||||
lspconfig[lsp].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
end
|
||||
|
||||
local luasnip = require 'luasnip'
|
||||
local cmp = require 'cmp'
|
||||
|
||||
|
||||
cmp.setup {
|
||||
preselect = cmp.PreselectMode.None,
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
}),
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'path' },
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
36
hosts/shared/dotfiles/nvim/lua/config/plugins/lualine.lua
Normal file
36
hosts/shared/dotfiles/nvim/lua/config/plugins/lualine.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'wombat',
|
||||
component_separators = { left = '', right = ''},
|
||||
section_separators = { left = '', right = ''},
|
||||
disabled_filetypes = {},
|
||||
always_divide_middle = true,
|
||||
globalstatus = true,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {'mode'},
|
||||
lualine_b = {'branch', 'diff', 'diagnostics'},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
||||
lualine_y = {'progress'},
|
||||
lualine_z = {'location'}
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'location'},
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
tabline = {
|
||||
lualine_a = {'buffers'},
|
||||
lualine_b = {'branch'},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {},
|
||||
lualine_y = {},
|
||||
lualine_z = {'tabs'}
|
||||
},
|
||||
extensions = {}
|
||||
}
|
||||
38
hosts/shared/dotfiles/nvim/lua/config/settings.lua
Normal file
38
hosts/shared/dotfiles/nvim/lua/config/settings.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
vim.opt.cursorline=true
|
||||
vim.opt.relativenumber=true
|
||||
vim.opt.number=true
|
||||
|
||||
vim.opt.scrolloff=10
|
||||
|
||||
vim.opt.autoindent=true
|
||||
vim.opt.expandtab=true
|
||||
vim.opt.softtabstop=4
|
||||
vim.opt.shiftwidth=4
|
||||
vim.opt.shiftround=true
|
||||
|
||||
vim.opt.backspace={'indent','eol','start'}
|
||||
vim.opt.hidden=true
|
||||
vim.opt.laststatus=2
|
||||
vim.opt.display='lastline'
|
||||
|
||||
vim.opt.showmode=true
|
||||
vim.opt.showcmd=true
|
||||
|
||||
vim.opt.incsearch=true
|
||||
vim.opt.ignorecase=true
|
||||
vim.opt.smartcase=true
|
||||
|
||||
vim.opt.ttyfast=true
|
||||
vim.opt.updatetime=300
|
||||
|
||||
vim.opt.splitright=true
|
||||
|
||||
vim.opt.wrapscan=true
|
||||
vim.opt.report=0
|
||||
|
||||
vim.opt.list=true
|
||||
vim.opt.completeopt=menuone,noselect
|
||||
|
||||
vim.opt.undofile=true
|
||||
|
||||
vim.g['loaded_perl_provider']=0
|
||||
9
hosts/shared/dotfiles/nvim/lua/config/vimscript/init.vim
Normal file
9
hosts/shared/dotfiles/nvim/lua/config/vimscript/init.vim
Normal file
@@ -0,0 +1,9 @@
|
||||
filetype plugin indent on
|
||||
syntax on
|
||||
colorscheme kanagawa
|
||||
|
||||
if has('multi_byte') && &encoding ==# 'utf-8'
|
||||
let &listchars = 'tab:▸ ,extends:❯,precedes:❮,nbsp:±'
|
||||
else
|
||||
let &listchars = 'tab:> ,extends:>,precedes:<,nbsp:.'
|
||||
endif
|
||||
Binary file not shown.
Binary file not shown.
20
hosts/shared/dotfiles/tmux/.tmux.conf
Normal file
20
hosts/shared/dotfiles/tmux/.tmux.conf
Normal file
@@ -0,0 +1,20 @@
|
||||
unbind C-b
|
||||
set-option -g prefix C-a
|
||||
bind-key C-a send-prefix
|
||||
|
||||
unbind-key '"'
|
||||
unbind-key %
|
||||
bind-key | split-window -h -c "#{pane_current_path}"
|
||||
bind-key - split-window -v -c "#{pane_current_path}"
|
||||
|
||||
bind-key h select-pane -L
|
||||
bind-key j select-pane -D
|
||||
bind-key k select-pane -U
|
||||
bind-key l select-pane -R
|
||||
bind-key -r H resize-pane -L 5
|
||||
bind-key -r J resize-pane -D 5
|
||||
bind-key -r K resize-pane -U 5
|
||||
bind-key -r L resize-pane -R 5
|
||||
|
||||
|
||||
|
||||
11
main.log
Normal file
11
main.log
Normal file
@@ -0,0 +1,11 @@
|
||||
[1717810556] Log start
|
||||
[1717810556] Cmd: llama
|
||||
[1717810556] main: build = 0 (unknown)
|
||||
[1717810556] main: built with gcc (GCC) 13.2.0 for x86_64-unknown-linux-gnu
|
||||
[1717810556] main: seed = 1717810556
|
||||
[1717810556] main: llama backend init
|
||||
[1717810556] main: load the model and apply lora adapter, if any
|
||||
[1717810556] llama_model_load: error loading model: llama_model_loader: failed to load model from models/7B/ggml-model-f16.gguf
|
||||
|
||||
[1717810556] llama_load_model_from_file: failed to load model
|
||||
[1717810556] main: error: unable to load model
|
||||
6
overlays/llama-cpp.nix
Normal file
6
overlays/llama-cpp.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{}:
|
||||
{
|
||||
final: prev: {
|
||||
llama-cpp = ;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user