Compare commits
11 Commits
766fd78e81
...
main
Author | SHA1 | Date | |
---|---|---|---|
7dfccffab5 | |||
b2df93a1f6 | |||
85ccc75998 | |||
8c0072e74b | |||
847ca0e7ac | |||
cd38bf3d56 | |||
4095a0443c | |||
94df85afed | |||
a8706ae56e | |||
edb2f03d22 | |||
f11f3892fe |
@ -65,7 +65,7 @@
|
||||
|
||||
; neovide
|
||||
; (set nvim.g.neovide_fullscreen true)
|
||||
(set nvim.g.neovide_cursor_vfx_mode "pixiedust")
|
||||
(set nvim.g.neovide_cursor_vfx_mode "railgun")
|
||||
(set nvim.o.guifont "FiraCode Nerd Font Mono:h16")
|
||||
|
||||
(require "plugins")
|
||||
|
49
fnl/lsp.fnl
49
fnl/lsp.fnl
@ -1,8 +1,10 @@
|
||||
(module user.lsp
|
||||
{require {nvim aniseed.nvim}})
|
||||
|
||||
(global lspconfig (require :lspconfig))
|
||||
(global treesitter (require :nvim-treesitter.configs))
|
||||
(local lspconfig (require :lspconfig))
|
||||
(local treesitter_configs (require :nvim-treesitter.configs))
|
||||
(local treesitter_install (require :nvim-treesitter.install))
|
||||
(local cmp (require :cmp))
|
||||
|
||||
(nvim.set_keymap "" :gd "<cmd>lua vim.lsp.buf.definition()<CR>" {:silent true :noremap true})
|
||||
(nvim.set_keymap "" :gh "<cmd>lua vim.lsp.buf.hover()<CR>" {:silent true :noremap true})
|
||||
@ -13,17 +15,13 @@
|
||||
|
||||
(lspconfig.rust_analyzer.setup {})
|
||||
(lspconfig.gopls.setup {})
|
||||
(lspconfig.denols.setup {})
|
||||
; (lspconfig.sourcekit.setup {})
|
||||
; (lspconfig.ccls.setup
|
||||
; {:init_options {:clang {:extraArgs ["-I/usr/local/include"
|
||||
; "-I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1"
|
||||
; "-I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include"
|
||||
; "-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include"
|
||||
; "-I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include"
|
||||
; "-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks"]}}})
|
||||
(lspconfig.hls.setup {
|
||||
:cmd ["haskell-language-server-wrapper" "--lsp" "--logfile" "/home/r00t/.cache/nvim/hls.log" "--debug"]
|
||||
})
|
||||
|
||||
(treesitter.setup {:ensure_installed ["c" "cpp" "python" "go" "rust" "javascript" "lua"]
|
||||
; treesitter
|
||||
(set treesitter_install.compilers ["clang"])
|
||||
(treesitter_configs.setup {:ensure_installed ["c" "cpp" "python" "go" "rust" "javascript" "typescript" "lua"]
|
||||
:highlight {:enable true}
|
||||
:indent {:enable true}
|
||||
:textobjects {:select {:enable true
|
||||
@ -33,4 +31,29 @@
|
||||
:swap_next {:<S-l> "@parameter.inner"}
|
||||
:swap_previous {:<S-h> "@parameter.inner"}}}})
|
||||
|
||||
(set nvim.o.completeopt "menuone,noselect")
|
||||
;; completion
|
||||
(set nvim.o.completeopt "menu,menuone,noselect")
|
||||
|
||||
(def- cmp-src-menu-items
|
||||
{:buffer "buffer"
|
||||
:nvim_lsp "lsp"
|
||||
:path "path"})
|
||||
|
||||
(def- cmp-srcs
|
||||
[{:name :nvim_lsp}
|
||||
{:name :path}
|
||||
{:name :buffer}])
|
||||
|
||||
(cmp.setup {:formatting
|
||||
{:format (fn [entry item]
|
||||
(set item.menu (or (. cmp-src-menu-items entry.source.name) ""))
|
||||
item)}
|
||||
:mapping {:<S-k> (cmp.mapping.select_prev_item)
|
||||
:<S-j> (cmp.mapping.select_next_item)
|
||||
; :<C-b> (cmp.mapping.scroll_docs (- 4))
|
||||
; :<C-f> (cmp.mapping.scroll_docs 4)
|
||||
; :<C-Space> (cmp.mapping.complete)
|
||||
; :<C-e> (cmp.mapping.close)
|
||||
:<CR> (cmp.mapping.confirm {:behavior cmp.ConfirmBehavior.Insert
|
||||
:select true})}
|
||||
:sources cmp-srcs})
|
||||
|
@ -7,30 +7,48 @@
|
||||
(use :Olical/aniseed) ; fennel to lua
|
||||
|
||||
; themes
|
||||
(use :projekt0n/github-nvim-theme)
|
||||
; (use :projekt0n/github-nvim-theme)
|
||||
(use {
|
||||
1 :FrenzyExists/aquarium-vim
|
||||
:run ":silent! colorscheme aquarium"
|
||||
})
|
||||
|
||||
; ui
|
||||
(use :kyazdani42/nvim-web-devicons)
|
||||
(use :nvim-lualine/lualine.nvim)
|
||||
(use :junegunn/goyo.vim)
|
||||
(use :lukas-reineke/indent-blankline.nvim)
|
||||
(use :ntpeters/vim-better-whitespace)
|
||||
(use :valloric/matchtagalways)
|
||||
; (use :valloric/matchtagalways)
|
||||
|
||||
; util
|
||||
(use :cocopon/vaffle.vim)
|
||||
(use :jeetsukumaran/vim-buffergator)
|
||||
(use :tpope/vim-fugitive)
|
||||
(use :blackCauldron7/surround.nvim)
|
||||
(use :chaoren/vim-wordmotion)
|
||||
(use :ur4ltz/surround.nvim)
|
||||
(use :b3nj5m1n/kommentary)
|
||||
(use :nelstrom/vim-visual-star-search)
|
||||
(use :timakro/vim-yadi)
|
||||
|
||||
(use {1 :nvim-treesitter/nvim-treesitter :run ":TSUpdate"})
|
||||
(use :nvim-treesitter/nvim-treesitter-textobjects)
|
||||
(use :hrsh7th/nvim-compe)
|
||||
(use {
|
||||
1 :nvim-treesitter/nvim-treesitter
|
||||
:run (fn [] (let [ts (require :nvim-treesitter.install)]
|
||||
(ts.update {:with_sync true})))
|
||||
})
|
||||
(use {
|
||||
1 :nvim-treesitter/nvim-treesitter-textobjects
|
||||
:after "nvim-treesitter"
|
||||
})
|
||||
(use :neovim/nvim-lspconfig)
|
||||
|
||||
; completion
|
||||
(use :hrsh7th/nvim-cmp)
|
||||
(use :hrsh7th/cmp-nvim-lua)
|
||||
(use :hrsh7th/cmp-nvim-lsp)
|
||||
(use :hrsh7th/cmp-buffer)
|
||||
(use :hrsh7th/cmp-path)
|
||||
|
||||
(use :ibhagwan/fzf-lua)
|
||||
|
||||
; others
|
||||
(use :wakatime/vim-wakatime)
|
||||
(use {1 :kkoomen/vim-doge :run ":call doge#install()"})))
|
||||
|
@ -2,14 +2,15 @@
|
||||
{require {nvim aniseed.nvim
|
||||
nu aniseed.nvim.util}})
|
||||
|
||||
(nvim.ex.autocmd "BufRead * DetectIndent")
|
||||
|
||||
;; theme
|
||||
(global github-theme (require :github-theme))
|
||||
(github-theme.setup {:theme_style :dark})
|
||||
(nvim.command "silent! colorscheme aquarium")
|
||||
|
||||
;; buffergator
|
||||
(set nvim.g.buffergator_display_regime "parentdir")
|
||||
|
||||
;; nvim tree
|
||||
;; Vaffle
|
||||
(defn open-vaffle []
|
||||
(let [bufname (nvim.fn.bufname "%")]
|
||||
(if (= bufname "")
|
||||
@ -19,10 +20,10 @@
|
||||
(nu.fn-bridge :OpenVaffle :user.plugin.settings :open-vaffle)
|
||||
(nvim.set_keymap :n :<leader>dd ":call OpenVaffle()<CR>" {:noremap true :silent true})
|
||||
|
||||
;; vim-operator-surround
|
||||
(nvim.set_keymap "" :sa "<Plug>(operator-surround-append)" {:silent true})
|
||||
(nvim.set_keymap "" :sd "<Plug>(operator-surround-delete)" {:silent true})
|
||||
(nvim.set_keymap "" :sr "<Plug>(operator-surround-replace)" {:silent true})
|
||||
;; fzf
|
||||
|
||||
(nvim.set_keymap :n :<leader>ff ":lua require('fzf-lua').live_grep()<CR>" {:noremap true :silent true})
|
||||
|
||||
|
||||
;; surround.nvim
|
||||
(global surround (require :surround))
|
||||
@ -38,7 +39,7 @@
|
||||
;; lualine
|
||||
(global lualine (require :lualine))
|
||||
(lualine.setup
|
||||
{:options {:theme :nightfly
|
||||
{:options {:theme :aquarium
|
||||
:section_separators ["" ""]
|
||||
:component_separators ["" ""]
|
||||
:icons_enabled true}
|
||||
@ -48,7 +49,7 @@
|
||||
:icon ""}}
|
||||
:lualine_c {1 {1 :filename
|
||||
:file_status true}}
|
||||
:lualine_x ["encoding" "fileformat" "filetype"]
|
||||
:lualine_x ["%{&expandtab?shiftwidth().\"sp\":\"tabs\"}" "encoding" "fileformat" "filetype"]
|
||||
:lualine_y ["progress"]
|
||||
:lualine_z ["location"]}
|
||||
:inactive_sections {:lualine_a {}
|
||||
|
16
init.lua
16
init.lua
@ -3,7 +3,8 @@
|
||||
local fn = vim.fn
|
||||
local execute = vim.api.nvim_command
|
||||
|
||||
if fn.empty(fn.glob(fn.stdpath('data')..'/site/pack/packer/start/')) > 0 then
|
||||
bootstrap = fn.empty(fn.glob(fn.stdpath('data')..'/site/pack/packer/start/')) > 0
|
||||
if bootstrap then
|
||||
local github = 'https://github.com/'
|
||||
local packer_git = github..'wbthomason/packer.nvim'
|
||||
local aniseed_git = github..'Olical/aniseed'
|
||||
@ -12,6 +13,13 @@ if fn.empty(fn.glob(fn.stdpath('data')..'/site/pack/packer/start/')) > 0 then
|
||||
local packer_path = install_path..'packer.nvim'
|
||||
local aniseed_path = install_path..'aniseed'
|
||||
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "PackerComplete",
|
||||
callback = function()
|
||||
vim.cmd(":qa!")
|
||||
end,
|
||||
})
|
||||
|
||||
fn.system({'git', 'clone', packer_git, packer_path})
|
||||
fn.system({'git', 'clone', aniseed_git, aniseed_path})
|
||||
|
||||
@ -21,12 +29,6 @@ if fn.empty(fn.glob(fn.stdpath('data')..'/site/pack/packer/start/')) > 0 then
|
||||
-- load only plugins to install plugins
|
||||
require('aniseed.env').init({compile = true, module = 'plugins'})
|
||||
execute 'PackerUpdate'
|
||||
|
||||
print('Plugins are installed, but config is not fully loaded, please open Neovim again')
|
||||
|
||||
else
|
||||
|
||||
-- call through aniseed
|
||||
vim.g['aniseed#env'] = true
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user