Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
fedemengo committed Oct 3, 2023
1 parent 8a90a1d commit b29f8fe
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 32 deletions.
8 changes: 3 additions & 5 deletions fnl/core.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,7 @@
(set vim.o.updatetime interval)

(set vim.o.list true)
(set vim.opt.listchars {:tab "▸ " :eol "↵"})

; :space "⋅"})
(set vim.opt.listchars {:tab "▸ " :eol "↵"}) ; :space "⋅"})

; open all folds by default

Expand All @@ -150,9 +148,9 @@

(set vim.o.undodir undodir_path)
(set vim.o.undofile true)
;;(vim.cmd "colorscheme github_dimmed")

(vim.cmd "colorscheme PaperColor")
;;(vim.cmd "colorscheme github_light")
(vim.cmd "colorscheme monokai-pro")
(set vim.o.background :dark)

(vim.cmd "hi VertSplit ctermbg=NONE guibg=NONE guifg=NONE")
2 changes: 1 addition & 1 deletion fnl/mods/lsp/lsp.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
:flags {:allow_incremental_sync true
:debounce_text_changes 1000}
:settings {:gopls {:completeUnimported true
:buildFlags [:-tags=integration]
:buildFlags ["-tags=integration,opensearch"]
:gofumpt true
:experimentalPostfixCompletions true
:analyses {:nilness true
Expand Down
22 changes: 19 additions & 3 deletions fnl/mods/tools/nvim-tree.fnl
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
(module mods.tools.nvim-tree {autoload {tree nvim-tree api nvim-tree.api}})
(module :mods.tools.nvim-tree
{autoload {log :mods/dev/log tree :nvim-tree api :nvim-tree.api}})

(tree.setup)
(log.setup {:outfile :/tmp/nvim.log :color true :level :trace})

(map [:n :i] :<leader>nn api.tree.toggle {:desc "Toggle NvimTree"})
(set nvim-tree (require :nvim-tree))

(log.trace "Loading nvimtree" nvim-tree)

(nvim-tree.setup {:on_attach (fn [bufnr]
(log.trace "NvimTree attached")
(map [:n :i] :<leader>nn api.tree.toggle
{:desc "Toggle NvimTree"}))})

;;(when (vim.fn.has :autocmd)
;; (let [group (vim.api.nvim_create_augroup :filetype-mappings {:clear true})]
;; (vim.api.nvim_create_autocmd :FileType
;; {: group
;; :pattern "NvimTree"
;; :callback (fn []
;; (unmap [:n :i] :F))})))
30 changes: 10 additions & 20 deletions fnl/mods/tools/telescope.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -76,26 +76,17 @@
:search ""
:prompt_title "Fuzzy grep"})

(local ivy_config (themes.get_ivy {:borderchars {:prompt ["─"
""
""
""
"─"
"─"
""
""]
(fn gen_ivy_config [height]
(themes.get_ivy {:borderchars {:prompt ["─" "" "" "" "─" "─" "" ""]
:results [""]
:preview [""
""
""
""
""
""
""
""]}
:preview ["" "" "" "" "" "" "" ""]}
:preview_width 0.7
:layout_config {:height height}
:preview_title ""}))

(local ivy_config (gen_ivy_config 0.7))
(local small_ivy_config (gen_ivy_config 0.3))

(local fzf_opts_theme (merge-table ivy_config fuzzy_search_opts))

(local lsp_opts_theme
Expand Down Expand Up @@ -147,7 +138,6 @@

(map [:n] :<C-h> (bindf themed_count_find_files {:hidden true})
{:desc "Find all files [hidden]"})
(map [:n] :<C-f> themed_count_find_files {:desc "Find files"})

(map [:n] :fl (bindf builtin.lsp_document_symbols ivy_config)
{:desc "Find symbols [LSP]"})
Expand All @@ -165,7 +155,7 @@
(map [:n] :gr themed_bufnr_lsp_refs {:desc "References [LSP]"})
(map [:n] :gd themed_bufnr_lsp_defs {:desc "Definitions [LSP]"})
(map [:n] :fd (bindf builtin.diagnostics ivy_config) {:desc :Diagnostics})
(map [:n] :fe (bindf builtin.diagnostics diag_err_theme)
(map [:n] :fe (bindf (bindf builtin.diagnostics {:severity_bound :ERROR :prompt_title "Workspace Errors"}) ivy_config)
{:desc "Diagnostics [ERR]"})

(var pickers (require :telescope.pickers))
Expand Down Expand Up @@ -340,7 +330,7 @@
(p.find p)))

(local themed_magic (bindf magic ivy_config))
(local small_themed_magic (bindf magic small_ivy_config))

(map [:n] :F themed_magic {:desc "Find and move around"})
(map [:n] :fj themed_magic {:desc "Find and move around"})
(map [:n] :<C-space> themed_magic {:desc "Find and move around"})
(map [:n] :<C-f> small_themed_magic {:desc "Find and move around"})
5 changes: 3 additions & 2 deletions fnl/mods/ui/lualine.fnl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(module mods.ui.lualine {autoload {lualine :lualine navic :nvim-navic}})
(module mods.ui.lualine {autoload {lualine :lualine
navic :nvim-navic}})

(navic.setup {:depth_limit 5})

Expand All @@ -24,5 +25,5 @@
:always_visible true}]
:lualine_c [location {:cond navic.is_available}]
:lualine_x [:branch]
:lualine_y [:filetype session]
:lualine_y [:filetype session :lsp_progress]
:lualine_z [:progress :location]}})
3 changes: 3 additions & 0 deletions fnl/mods/ui/monokai.fnl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(module mods.ui.monokai {autoload {monokai :monokai-pro}})

(monokai.setup {:filter :machine})
4 changes: 3 additions & 1 deletion fnl/plugins.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
:lewis6991/impatient.nvim {}
:NLKNguyen/papercolor-theme {}
:fedemengo/github-nvim-theme {}
:loctvl842/monokai-pro.nvim {:mod :ui.monokai}

;; ln -s ~/.local/share/nvim/site/pack/packer/opt/copilot.lua ~/.local/share/nvim/site/pack/packer/start/copilot.lua
:zbirenbaum/copilot.lua {:cmd :Copilot
:event :InsertEnter
Expand Down Expand Up @@ -72,7 +74,7 @@
;; theme
:rcarriga/nvim-notify {:mod :ui.notify}
:folke/zen-mode.nvim {:mod :ui.zenmode}
:nvim-lualine/lualine.nvim {:mod :ui.lualine}
:arkav/lualine-lsp-progress {:mod :ui.lualine}
:akinsho/bufferline.nvim {:requires [[:nvim-tree/nvim-web-devicons]] :mod :ui.tab}
;; programming
:nvim-treesitter/nvim-treesitter {:run ":TSUpdate" :mod :tools.treesitter}
Expand Down

0 comments on commit b29f8fe

Please sign in to comment.