summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Vink <mike1994vink@gmail.com>2022-11-26 00:12:31 +0100
committerMike Vink <mike1994vink@gmail.com>2022-11-26 00:12:31 +0100
commitf21c9d7ff9750d45b55c1639f8631ff38f80cb5d (patch)
treede3bd690acc86f51f6a343aef28ca89875482830
parent84e66a22a3dcbf51afcefdcd065d1f1c6a0fd95f (diff)
bump
-rw-r--r--flake.nix5
-rw-r--r--home.nix8
-rw-r--r--neovim/fnl/conf/init.fnl12
-rw-r--r--neovim/fnl/conf/lsp.fnl34
-rw-r--r--neovim/fnl/conf/pkgs.fnl1
-rw-r--r--neovim/fnl/conf/pkgs/treesitter.fnl3
-rw-r--r--neovim/fnl/conf/settings.fnl4
7 files changed, 38 insertions, 29 deletions
diff --git a/flake.nix b/flake.nix
index 080c657..5c042d8 100644
--- a/flake.nix
+++ b/flake.nix
@@ -68,6 +68,11 @@
in
prev.vimPlugins
// {
+ neotest-python = getVimPlugin {
+ name = "neotest-python";
+ git = "nvim-neotest/neotest-python";
+ rev = "e53920d145d37783c8d8428365a0a230e0a18cb5";
+ };
firvish-nvim = getVimPlugin {
name = "firvish-nvim";
git = "Furkanzmc/firvish.nvim";
diff --git a/home.nix b/home.nix
index 29a4f45..8cac488 100644
--- a/home.nix
+++ b/home.nix
@@ -123,10 +123,6 @@ LUA
vim-dirvish
vim-fugitive
vim-oscyank
- firvish-nvim
-
- # moving around
- marks-nvim
# Coding
nvim-lspconfig
@@ -140,6 +136,10 @@ LUA
lsp_signature-nvim
vim-test
+ # testing
+ neotest
+ neotest-python
+
# cmp
nvim-cmp
cmp-nvim-lsp
diff --git a/neovim/fnl/conf/init.fnl b/neovim/fnl/conf/init.fnl
index 2888e0b..c4e6d88 100644
--- a/neovim/fnl/conf/init.fnl
+++ b/neovim/fnl/conf/init.fnl
@@ -1,11 +1,11 @@
-(tset (. vim "g") "mapleader" " ")
-(tset (. vim "g") "maplocalleader" " ")
-
(vim.cmd "colorscheme gruvbox-material")
+(vim.cmd "filetype plugin on")
+(vim.cmd "filetype indent on")
+(vim.cmd "highlight WinSeparator guibg=None")
-(let [ts (require :nvim-treesitter.configs)]
- (ts.setup
- {:highlight {:enable true}}))
+(let [nt (require :neotest)
+ python (require :neotest-python)]
+ (nt.setup {:adapters [(python {:dap {:justMyCode false}})]}))
(require :conf.lsp)
(require :conf.pkgs)
diff --git a/neovim/fnl/conf/lsp.fnl b/neovim/fnl/conf/lsp.fnl
index 8cd4d53..9b945e1 100644
--- a/neovim/fnl/conf/lsp.fnl
+++ b/neovim/fnl/conf/lsp.fnl
@@ -1,8 +1,8 @@
(fn map-to-capabilities [{: client : buf}]
- (fn bufoption [name value]
+ (fn bo [name value]
(vim.api.nvim_buf_set_option buf name value))
- (fn bufmap [mode key cb]
+ (fn bm [mode key cb]
(vim.keymap.set mode key cb {:silent true :noremap true :buffer buf}))
(fn lspdo [action]
@@ -10,23 +10,21 @@
(fn use [cpb]
(match cpb
- :completion (bufoption :omnifunc "v:lua.vim.lsp.omnifunc")
- :rename (bufmap :n :<leader>gr (lspdo :rename))
- :signature_help (bufmap :n :<leader>gs (lspdo :signature_help))
- :goto_definition (bufmap :n :<leader>gd (lspdo :definition))
- :declaration (bufmap :n :<leader>gD (lspdo :declaration))
- :implementation (bufmap :n :<leader>gi (lspdo :implementation))
- :find_references (bufmap :n :<leader>gi (lspdo :references))
- :document_symbol (bufmap :n :<leader>gds (lspdo :workspace_symbol))
- :code_action (bufmap :n :<leader>ga (lspdo :code_action))
- :document_range_formatting (bufmap :v :<leader>gq
- (lspdo :range_formatting))
- :hover (bufoption :keywordprg ":LspHover")
+ :completion (bo :omnifunc "v:lua.vim.lsp.omnifunc")
+ :rename (bm :n :<leader>gr (lspdo :rename))
+ :signature_help (bm :n :<leader>gs (lspdo :signature_help))
+ :goto_definition (bm :n :<leader>gd (lspdo :definition))
+ :declaration (bm :n :<leader>gD (lspdo :declaration))
+ :implementation (bm :n :<leader>gi (lspdo :implementation))
+ :find_references (bm :n :<leader>gi (lspdo :references))
+ :document_symbol (bm :n :<leader>gds (lspdo :workspace_symbol))
+ :code_action (bm :n :<leader>ga (lspdo :code_action))
+ :document_range_formatting (bm :v :<leader>gq (lspdo :range_formatting))
+ :hover (bo :keywordprg ":LspHover")
:documentFormattingProvider ((fn []
- (bufoption :formatexpr
- "v:lua.vim.lsp.format()")
- (bufmap :n :<leader>gq
- #(vim.lsp.buf.format {:async true}))))))
+ (bo :formatexpr "v:lua.vim.lsp.format()")
+ (bm :n :<leader>gq
+ #(vim.lsp.buf.format {:async true}))))))
(each [cpb enabled? (pairs client.server_capabilities)]
(if enabled?
diff --git a/neovim/fnl/conf/pkgs.fnl b/neovim/fnl/conf/pkgs.fnl
index df59b09..1cbe4a9 100644
--- a/neovim/fnl/conf/pkgs.fnl
+++ b/neovim/fnl/conf/pkgs.fnl
@@ -1,2 +1,3 @@
(require :conf.pkgs.cmp)
(require :conf.pkgs.null-ls)
+(require :conf.pkgs.treesitter)
diff --git a/neovim/fnl/conf/pkgs/treesitter.fnl b/neovim/fnl/conf/pkgs/treesitter.fnl
new file mode 100644
index 0000000..a35b7c8
--- /dev/null
+++ b/neovim/fnl/conf/pkgs/treesitter.fnl
@@ -0,0 +1,3 @@
+(let [ts (require :nvim-treesitter.configs)]
+ (ts.setup
+ {:highlight {:enable true}}))
diff --git a/neovim/fnl/conf/settings.fnl b/neovim/fnl/conf/settings.fnl
index f7c0d88..36e336c 100644
--- a/neovim/fnl/conf/settings.fnl
+++ b/neovim/fnl/conf/settings.fnl
@@ -16,7 +16,9 @@
loaded_tohtml false
loaded_tutor false
loaded_zipPlugin false
-
+
+ mapleader " "
+ maplocalleader " "
dirvish_mode ":sort | sort ,^.*[^/]$, r")
(settings