mirror of
https://github.com/Smaug123/nix-dotfiles
synced 2025-10-07 07:28:40 +00:00
Nearly working
This commit is contained in:
@@ -168,6 +168,23 @@
|
||||
nixpkgs.vimPlugins.telescope-nvim
|
||||
nixpkgs.vimPlugins.tagbar
|
||||
nixpkgs.vimPlugins.fzf-vim
|
||||
{
|
||||
plugin = let
|
||||
name = "coq.artifacts";
|
||||
rev = "9c5067a471322c6bb866545e88e5b28c82511865";
|
||||
in
|
||||
nixpkgs.vimUtils.buildVimPlugin {
|
||||
name = name;
|
||||
src = nixpkgs.fetchFromGitHub {
|
||||
owner = "ms-jpq";
|
||||
repo = name;
|
||||
rev = rev;
|
||||
hash = "sha256-BHm7U3pINtYamY7m26I4lQee7ccJ6AcHmYx7j1MRFDA=";
|
||||
};
|
||||
};
|
||||
config = builtins.readFile ./nvim/venv-selector.lua;
|
||||
type = "lua";
|
||||
}
|
||||
{
|
||||
plugin = let
|
||||
name = "venv-selector.nvim";
|
||||
@@ -183,7 +200,7 @@
|
||||
};
|
||||
};
|
||||
config = builtins.readFile ./nvim/venv-selector.lua;
|
||||
type = "lua";
|
||||
type = "lua";
|
||||
}
|
||||
{
|
||||
plugin = nixpkgs.vimPlugins.Ionide-vim;
|
||||
@@ -200,11 +217,11 @@
|
||||
}
|
||||
{
|
||||
plugin = nixpkgs.vimPlugins.chadtree;
|
||||
config = "let g:chadtree_settings = {'xdg': v:true}";
|
||||
config = builtins.readFile ./nvim/chadtree.vim;
|
||||
}
|
||||
{
|
||||
plugin = nixpkgs.vimPlugins.coq_nvim;
|
||||
config = ''let g:coq_settings = { 'auto_start': v:true, 'xdg': v:true }'';
|
||||
config = ''let g:coq_settings = { 'auto_start': 'shut-up', 'xdg': v:true }'';
|
||||
}
|
||||
{
|
||||
plugin = nixpkgs.vimPlugins.rustaceanvim;
|
||||
@@ -212,14 +229,6 @@
|
||||
{
|
||||
plugin = nixpkgs.vimPlugins.LanguageClient-neovim;
|
||||
}
|
||||
{
|
||||
plugin = nixpkgs.vimPlugins.syntastic;
|
||||
config = '' let g:syntastic_rust_checkers = ['cargo']
|
||||
let g:syntastic_always_populate_loc_list = 1
|
||||
let g:syntastic_auto_loc_list = 1
|
||||
let g:syntastic_check_on_open = 1
|
||||
let g:syntastic_check_on_wq = 0'';
|
||||
}
|
||||
];
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
@@ -227,7 +236,7 @@
|
||||
withPython3 = true;
|
||||
|
||||
extraLuaConfig = builtins.replaceStrings ["%PYTHONENV%"] ["${pythonEnv}"] (builtins.readFile ./nvim/init.lua);
|
||||
# extraConfig = builtins.readFile ./nvim/init.vim;
|
||||
extraConfig = builtins.readFile ./nvim/init.vim;
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
@@ -248,6 +257,7 @@
|
||||
};
|
||||
|
||||
home.packages = [
|
||||
nixpkgs.nil
|
||||
nixpkgs.fsautocomplete
|
||||
nixpkgs.keepassxc
|
||||
nixpkgs.rust-analyzer
|
||||
|
4
home-manager/nvim/chadtree.vim
Normal file
4
home-manager/nvim/chadtree.vim
Normal file
@@ -0,0 +1,4 @@
|
||||
let g:chadtree_settings = {'xdg': v:true}
|
||||
|
||||
autocmd VimEnter * CHADopen --nofocus
|
||||
autocmd bufenter * if (winnr("$") == 1 && &filetype == 'CHADtree') | q | endif
|
@@ -328,3 +328,22 @@ set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\
|
||||
|
||||
set fileformat=unix
|
||||
set fileformats=unix
|
||||
|
||||
function MarkdownPreview()
|
||||
let temp_file = tempname() . ".md"
|
||||
let file_name = substitute(tolower(expand('%:t')), '\W', '_', 'g')
|
||||
let temp_html = "/tmp/" . file_name . "_tmp.html"
|
||||
|
||||
execute 'write! ' . temp_file
|
||||
|
||||
let pandoc_cmd = 'pandoc ' . temp_file . ' -o ' . temp_html
|
||||
|
||||
call system(pandoc_cmd)
|
||||
|
||||
" Use tmux and lynx to preview the HTML file
|
||||
let lynx_cmd = 'tmux split-window -h lynx ' . temp_html
|
||||
execute "silent call jobstart(split('" . lynx_cmd . "', ' '))"
|
||||
|
||||
silent! execute "call delete('" . temp_file . "')"
|
||||
endfunction
|
||||
nnoremap <localleader>mp :call MarkdownPreview()<CR>
|
||||
|
@@ -1,3 +1,23 @@
|
||||
require('lspconfig').pyright.setup {
|
||||
}
|
||||
local coq = require('coq')
|
||||
|
||||
require('lspconfig').pyright.setup(coq.lsp_ensure_capabilities({
|
||||
handlers = {
|
||||
["textDocument/publishDiagnostics"] = function(...)
|
||||
vim.lsp.diagnostic.on_publish_diagnostics(...)
|
||||
|
||||
local window = vim.api.nvim_get_current_win()
|
||||
vim.diagnostic.setloclist({open_loclist = false})
|
||||
vim.api.nvim_set_current_win(window)
|
||||
end,
|
||||
},
|
||||
}))
|
||||
|
||||
require('lspconfig').nil_ls.setup (coq.lsp_ensure_capabilities({
|
||||
settings = {
|
||||
nix = {
|
||||
flake = {
|
||||
autoArchive = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}))
|
||||
|
@@ -1,7 +1,6 @@
|
||||
local venv_selector = require 'venv-selector'
|
||||
|
||||
venv_selector.setup {
|
||||
--- other configuration
|
||||
changed_venv_hooks = { venv_selector.hooks.pyright },
|
||||
name = { "venv", ".venv" },
|
||||
}
|
||||
@@ -10,6 +9,7 @@ vim.api.nvim_create_autocmd('VimEnter', {
|
||||
desc = 'Auto select virtualenv Nvim open',
|
||||
pattern = '*',
|
||||
callback = function()
|
||||
-- Mystery: this seems to be being called twice whenever we open nvim
|
||||
local venv = vim.fn.findfile('pyproject.toml', vim.fn.getcwd() .. ';')
|
||||
if venv ~= '' then
|
||||
require('venv-selector').retrieve_from_cache()
|
||||
|
Reference in New Issue
Block a user